window.__require = function e(t, n, r) {
  function s(o, u) {
    if (!n[o]) {
      if (!t[o]) {
        var b = o.split("/");
        b = b[b.length - 1];
        if (!t[b]) {
          var a = "function" == typeof __require && __require;
          if (!u && a) return a(b, !0);
          if (i) return i(b, !0);
          throw new Error("Cannot find module '" + o + "'");
        }
        o = b;
      }
      var f = n[o] = {
        exports: {}
      };
      t[o][0].call(f.exports, function(e) {
        var n = t[o][1][e];
        return s(n || e);
      }, f, f.exports, e, t, n, r);
    }
    return n[o].exports;
  }
  var i = "function" == typeof __require && __require;
  for (var o = 0; o < r.length; o++) s(r[o]);
  return s;
}({
  AccountModelComp: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "1fbaeag0D5Br4pyaYyw4QUQ", "AccountModelComp");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var storage_1 = require("../../core/common/storage/storage");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var AccountModelComp = function() {
      function AccountModelComp() {
        this.yszcBol = false;
        this.zdBol = true;
        this.BannerBol = true;
        this.cblBol = false;
        this.opencblBol = false;
        this.pdPlatFrom = 1;
        this.fs = 0;
        this.enterGame = true;
        this.starttime = 0;
        this.scdjIcon = 0;
        this.initBl = 20;
        this.blSpeed = 1;
      }
      AccountModelComp.prototype.initBanner = function() {
        this.BannerBol = true;
      };
      AccountModelComp.prototype.InitData = function() {
        this.yszcBol = false;
        this.zdBol = true;
        this.fs = 0;
        this.cblBol = false;
        this.opencblBol = false;
        this.initBl = 20;
        this.blSpeed = 1;
        this.scdjIcon = 0;
        this.saveLocalData();
      };
      AccountModelComp.prototype.bjfsFun = function(num) {
        void 0 == this.fs && (this.fs = 0);
        if (num > this.fs) {
          this.fs = num;
          this.saveLocalData();
        }
      };
      AccountModelComp.prototype.cbllqjlFun = function() {
        this.cblBol = true;
        this.saveLocalData();
      };
      AccountModelComp.prototype.clickcblBtn = function() {
        this.opencblBol = true;
        this.saveLocalData();
      };
      AccountModelComp.prototype.xgFun = function() {
        this.yszcBol = true;
        this.saveLocalData();
      };
      AccountModelComp.prototype.ClosezdFun = function() {
        this.zdBol = false;
        this.saveLocalData();
      };
      AccountModelComp.prototype.OpenzdFun = function() {
        this.zdBol = true;
        this.saveLocalData();
      };
      AccountModelComp.prototype.returnData = function() {
        var data = {
          cblBol: this.cblBol,
          yszcBol: this.yszcBol,
          zdBol: this.zdBol,
          fs: this.fs,
          opencblBol: this.opencblBol,
          scdjIcon: this.scdjIcon,
          initBl: this.initBl,
          blSpeed: this.blSpeed
        };
        return data;
      };
      AccountModelComp.prototype.saveLocalData = function() {
        var data = this.returnData();
        storage_1.storage.setItem("AccountModel", data);
      };
      AccountModelComp.prototype.setData = function(data) {
        if (data) {
          this.cblBol = data.cblBol;
          this.yszcBol = data.yszcBol;
          this.zdBol = data.zdBol;
          this.fs = data.fs;
          this.opencblBol = data.opencblBol;
          this.scdjIcon = data.scdjIcon;
          this.initBl = data.initBl;
          this.blSpeed = data.blSpeed;
        } else console.error("\u8bfb\u6863\u5931\u8d25");
      };
      AccountModelComp = __decorate([ ccclass ], AccountModelComp);
      return AccountModelComp;
    }();
    exports.default = AccountModelComp;
    cc._RF.pop();
  }, {
    "../../core/common/storage/storage": "storage"
  } ],
  Account: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7b269xqg2xDlZLwaUjmgFA2", "Account");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../core/Engine");
    var twoThreeThreePlatform_1 = require("../../core/platformInterface/twoThreeThreePlatform");
    var GKManager_1 = require("../Manager/GKManager");
    var HxpgManager_1 = require("../Manager/HxpgManager");
    var QwghManager_1 = require("../Manager/QwghManager");
    var TLManager_1 = require("../Manager/TLManager");
    var AccountModelComp_1 = require("./AccountModelComp");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Account = function() {
      function Account() {
        this.state = false;
      }
      Account.prototype.init = function(callback) {
        this.initAccountData();
        this.ReGkData();
        this.RetlData();
        this.RetwothreethreeData();
        this.ReqwghGkData();
        this.RehxpgGkData();
        callback();
      };
      Account.prototype.RetwothreethreeData = function() {
        this.twothreethree = new twoThreeThreePlatform_1.default();
      };
      Account.prototype.RehxpgGkData = function() {
        this.hxpgManager = new HxpgManager_1.default();
      };
      Account.prototype.ReqwghGkData = function() {
        this.qwghManager = new QwghManager_1.default();
        var storage = Engine_1.engine.storage.getItem("qwghGkData");
        if (!storage || "" == storage) {
          this.qwghManager.initData();
          this.qwghManager.saveLocalData();
        }
        this.qwghManager.setData(Engine_1.engine.storage.getItem("qwghGkData"));
      };
      Account.prototype.ReGkData = function() {
        this.gkManager = new GKManager_1.default();
        var storage = Engine_1.engine.storage.getItem("gkData");
        if (!storage || "" == storage) {
          this.gkManager.initData();
          this.gkManager.saveLocalData();
        }
        this.gkManager.setMaxValue();
        this.gkManager.setData(Engine_1.engine.storage.getItem("gkData"));
      };
      Account.prototype.RetlData = function() {
        this.tlManager = new TLManager_1.default();
        var storage = Engine_1.engine.storage.getItem("tlData");
        if (!storage || "" == storage) {
          this.tlManager.initData();
          this.tlManager.saveLocalData();
        }
        this.tlManager.setData(Engine_1.engine.storage.getItem("tlData"));
      };
      Account.prototype.initAccountData = function() {
        this.AccountModel = new AccountModelComp_1.default();
        var storage = Engine_1.engine.storage.getItem("AccountModel");
        this.AccountModel.initBanner();
        if (null == storage) {
          this.AccountModel.InitData();
          this.AccountModel.saveLocalData();
        }
        this.AccountModel.setData(Engine_1.engine.storage.getItem("AccountModel"));
      };
      Account.prototype.clean = function() {
        Engine_1.engine.storage.clear();
      };
      return Account;
    }();
    exports.default = Account;
    cc._RF.pop();
  }, {
    "../../core/Engine": "Engine",
    "../../core/platformInterface/twoThreeThreePlatform": "twoThreeThreePlatform",
    "../Manager/GKManager": "GKManager",
    "../Manager/HxpgManager": "HxpgManager",
    "../Manager/QwghManager": "QwghManager",
    "../Manager/TLManager": "TLManager",
    "./AccountModelComp": "AccountModelComp"
  } ],
  ArrayUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "5653c1yhzZHbJm7tBqK6IBl", "ArrayUtil");
    "use strict";
    var __spreadArrays = this && this.__spreadArrays || function() {
      for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
      for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, 
      k++) r[k] = a[j];
      return r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ArrayUtil = function() {
      function ArrayUtil() {}
      ArrayUtil.noRepeated = function(arr) {
        var res = [ arr[0] ];
        for (var i = 1; i < arr.length; i++) {
          var repeat = false;
          for (var j = 0; j < res.length; j++) if (arr[i] == res[j]) {
            repeat = true;
            break;
          }
          repeat || res.push(arr[i]);
        }
        return res;
      };
      ArrayUtil.copy2DArray = function(array) {
        var newArray = [];
        for (var i = 0; i < array.length; i++) newArray.push(array[i].concat());
        return newArray;
      };
      ArrayUtil.fisherYatesShuffle = function(array) {
        var count = array.length;
        while (count) {
          var index = Math.floor(Math.random() * count--);
          var temp = array[count];
          array[count] = array[index];
          array[index] = temp;
        }
        return array;
      };
      ArrayUtil.confound = function(array) {
        var result = array.slice().sort(function() {
          return Math.random() - .5;
        });
        return result;
      };
      ArrayUtil.flattening = function(array) {
        for (;array.some(function(v) {
          return Array.isArray(v);
        }); ) array = [].concat.apply([], array);
        return array;
      };
      ArrayUtil.removeItem = function(array, item) {
        var temp = array.concat();
        for (var i = 0; i < temp.length; i++) {
          var value = temp[i];
          if (item == value) {
            array.splice(i, 1);
            break;
          }
        }
      };
      ArrayUtil.combineArrays = function(array1, array2) {
        var newArray = __spreadArrays(array1, array2);
        return newArray;
      };
      ArrayUtil.getRandomValueInArray = function(array) {
        var newArray = array[Math.floor(Math.random() * array.length)];
        return newArray;
      };
      return ArrayUtil;
    }();
    exports.default = ArrayUtil;
    cc._RF.pop();
  }, {} ],
  AsyncQueue: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "59ce7WZVYtMALAUFKq3lNMG", "AsyncQueue");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.AsyncQueue = void 0;
    var AsyncQueue = function() {
      function AsyncQueue() {
        this._runningAsyncTask = null;
        this._queues = [];
        this._isProcessingTaskUUID = 0;
        this._enable = true;
        this.complete = null;
      }
      Object.defineProperty(AsyncQueue.prototype, "queues", {
        get: function() {
          return this._queues;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(AsyncQueue.prototype, "enable", {
        get: function() {
          return this._enable;
        },
        set: function(val) {
          if (this._enable === val) return;
          this._enable = val;
          val && this.size > 0 && this.play();
        },
        enumerable: false,
        configurable: true
      });
      AsyncQueue.prototype.push = function(callback, params) {
        void 0 === params && (params = null);
        var uuid = AsyncQueue._$uuid_count++;
        this._queues.push({
          uuid: uuid,
          callbacks: [ callback ],
          params: params
        });
        return uuid;
      };
      AsyncQueue.prototype.pushMulti = function(params) {
        var callbacks = [];
        for (var _i = 1; _i < arguments.length; _i++) callbacks[_i - 1] = arguments[_i];
        var uuid = AsyncQueue._$uuid_count++;
        this._queues.push({
          uuid: uuid,
          callbacks: callbacks,
          params: params
        });
        return uuid;
      };
      AsyncQueue.prototype.remove = function(uuid) {
        var _a;
        if ((null === (_a = this._runningAsyncTask) || void 0 === _a ? void 0 : _a.uuid) === uuid) {
          cc.warn("\u6b63\u5728\u6267\u884c\u7684\u4efb\u52a1\u4e0d\u53ef\u4ee5\u79fb\u9664");
          return;
        }
        for (var i = 0; i < this._queues.length; i++) if (this._queues[i].uuid === uuid) {
          this._queues.splice(i, 1);
          break;
        }
      };
      Object.defineProperty(AsyncQueue.prototype, "size", {
        get: function() {
          return this._queues.length;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(AsyncQueue.prototype, "isProcessing", {
        get: function() {
          return this._isProcessingTaskUUID > 0;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(AsyncQueue.prototype, "isStop", {
        get: function() {
          if (this._queues.length > 0) return false;
          if (this.isProcessing) return false;
          return true;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(AsyncQueue.prototype, "runningParams", {
        get: function() {
          if (this._runningAsyncTask) return this._runningAsyncTask.params;
          return null;
        },
        enumerable: false,
        configurable: true
      });
      AsyncQueue.prototype.clear = function() {
        this._queues = [];
        this._isProcessingTaskUUID = 0;
        this._runningAsyncTask = null;
      };
      AsyncQueue.prototype.next = function(taskUUID, args) {
        void 0 === args && (args = null);
        if (this._isProcessingTaskUUID === taskUUID) {
          this._isProcessingTaskUUID = 0;
          this._runningAsyncTask = null;
          this.play(args);
        } else this._runningAsyncTask && cc.log(this._runningAsyncTask);
      };
      AsyncQueue.prototype.step = function() {
        this.isProcessing && this.next(this._isProcessingTaskUUID);
      };
      AsyncQueue.prototype.play = function(args) {
        var _this = this;
        void 0 === args && (args = null);
        if (this.isProcessing) return;
        if (!this._enable) return;
        var actionData = this._queues.shift();
        if (actionData) {
          this._runningAsyncTask = actionData;
          var taskUUID_1 = actionData.uuid;
          this._isProcessingTaskUUID = taskUUID_1;
          var callbacks = actionData.callbacks;
          if (1 == callbacks.length) {
            var nextFunc = function(nextArgs) {
              void 0 === nextArgs && (nextArgs = null);
              _this.next(taskUUID_1, nextArgs);
            };
            callbacks[0](nextFunc, actionData.params, args);
          } else {
            var fnum_1 = callbacks.length;
            var nextArgsArr_1 = [];
            var nextFunc = function(nextArgs) {
              void 0 === nextArgs && (nextArgs = null);
              --fnum_1;
              nextArgsArr_1.push(nextArgs || null);
              0 === fnum_1 && _this.next(taskUUID_1, nextArgsArr_1);
            };
            var knum = fnum_1;
            for (var i = 0; i < knum; i++) callbacks[i](nextFunc, actionData.params, args);
          }
        } else {
          this._isProcessingTaskUUID = 0;
          this._runningAsyncTask = null;
          this.complete && this.complete(args);
        }
      };
      AsyncQueue.prototype.yieldTime = function(time, callback) {
        void 0 === callback && (callback = null);
        var task = function(next, params, args) {
          var _t = setTimeout(function() {
            clearTimeout(_t);
            callback && callback();
            next(args);
          }, time);
        };
        this.push(task, {
          des: "AsyncQueue.yieldTime"
        });
      };
      AsyncQueue.excuteTimes = function(count, next) {
        void 0 === next && (next = null);
        var fnum = count;
        var tempCall = function() {
          --fnum;
          0 === fnum && next && next();
        };
        return tempCall;
      };
      AsyncQueue._$uuid_count = 1;
      return AsyncQueue;
    }();
    exports.AsyncQueue = AsyncQueue;
    cc._RF.pop();
  }, {} ],
  AudioEffect: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "320e9faHs1Ct7s7XcPZp/YC", "AudioEffect");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.audioEffect = void 0;
    var GameAudioConfig_1 = require("../../../game/common/config/GameAudioConfig");
    var MathUtil_1 = require("../../utils/MathUtil");
    var ResLoader_1 = require("../loader/ResLoader");
    var _a = cc._decorator, ccclass = _a.ccclass, menu = _a.menu;
    var audioEffect = function(_super) {
      __extends(audioEffect, _super);
      function audioEffect() {
        var _this = _super.call(this) || this;
        _this.effects = new Map();
        _this.audioIDs = {};
        _this.releaseTime = 6e4;
        _this.isPlaying = false;
        _this.schedule(_this.release, 1, cc.macro.REPEAT_FOREVER);
        return _this;
      }
      Object.defineProperty(audioEffect.prototype, "volume", {
        set: function(value) {
          cc.audioEngine.setEffectsVolume(MathUtil_1.MathUtils.clamp(value, 0, 1));
        },
        enumerable: false,
        configurable: true
      });
      audioEffect.prototype.stop = function() {
        cc.audioEngine.pauseAllEffects();
      };
      audioEffect.prototype.resume = function() {
        cc.audioEngine.resumeAllEffects();
      };
      audioEffect.prototype.addAudioID = function(auidoID, ccid) {
        var time = new Date().getTime();
        if (null != this.audioIDs[auidoID]) for (var i = 0; i < this.audioIDs[auidoID].length; ++i) {
          var element = this.audioIDs[auidoID][i];
          element.config == auidoID && (element.usertime = time);
        } else this.audioIDs[auidoID] = Array();
        this.audioIDs[auidoID].push({
          config: auidoID,
          id: ccid,
          usertime: time
        });
      };
      audioEffect.prototype.load = function(auidoID, loop, Volume, callback) {
        var _this = this;
        void 0 === loop && (loop = false);
        void 0 === Volume && (Volume = 1);
        var config = GameAudioConfig_1.AudioConfigData[auidoID];
        if (config) if (this.effects.has(config.path)) {
          var clip = this.effects.get(config.path);
          var ccid = cc.audioEngine.playEffect(clip, loop);
          cc.audioEngine.setVolume(ccid, MathUtil_1.MathUtils.clamp(Volume, 0, 1));
          this.addAudioID(auidoID, ccid);
          callback && callback();
        } else ResLoader_1.resLoader.load(config.bundle, config.path, cc.AudioClip, function(err, data) {
          err && cc.error(err);
          _this.effects.set(config.path, data);
          var clip = data;
          var ccid = cc.audioEngine.playEffect(clip, loop);
          cc.audioEngine.setVolume(ccid, MathUtil_1.MathUtils.clamp(Volume, 0, 1));
          _this.addAudioID(auidoID, ccid);
          callback && callback();
        }); else console.error("\u6b64\u97f3\u9891ID\u6ca1\u6709\u914d\u7f6e" + auidoID);
      };
      audioEffect.prototype.loadLoop = function(auidoID, callback) {
        var _this = this;
        var config = GameAudioConfig_1.AudioConfigData[auidoID];
        if (config) if (this.effects.has(config.path)) {
          this.clip = this.effects.get(config.path);
          if (this.isPlaying) {
            cc.audioEngine.playEffect(this.clip, true);
            ResLoader_1.resLoader.releaseDir(config.path, config.bundle);
            this.isPlaying = false;
          } else {
            cc.audioEngine.playEffect(this.clip, true);
            callback && callback();
            this.isPlaying = true;
          }
        } else ResLoader_1.resLoader.load(config.bundle, config.path, cc.AudioClip, function(err, data) {
          err && cc.error(err);
          if (_this.isPlaying) {
            _this.isPlaying = false;
            _this.stop();
          }
          _this.clip = data;
          _this.effects.set(config.path, data);
          cc.audioEngine.playEffect(_this.clip, false);
          _this.isPlaying = true;
          callback && callback();
        }); else console.error("\u6b64\u97f3\u9891ID\u6ca1\u6709\u914d\u7f6e" + auidoID);
      };
      audioEffect.prototype.release = function() {
        var time = new Date().getTime();
        var objstr = Object.keys(this.audioIDs);
        for (var i = 0; i < objstr.length; i++) {
          if (null == this.audioIDs[objstr[i]]) break;
          var ele = this.audioIDs[objstr[i]][0];
          var b = true;
          for (var j = 0; j < this.audioIDs[objstr[i]].length; j++) {
            var element = this.audioIDs[objstr[i]][j];
            if (cc.audioEngine.getState(element.id) == cc.audioEngine.AudioState.PLAYING) {
              b = false;
              break;
            }
          }
          if (b && Math.abs(ele.usertime - time) > this.releaseTime && this.effects.has(GameAudioConfig_1.AudioConfigData[ele.config].path)) {
            ResLoader_1.resLoader.releaseDir(GameAudioConfig_1.AudioConfigData[ele.config].path, GameAudioConfig_1.AudioConfigData[ele.config].bundle);
            this.effects.delete(GameAudioConfig_1.AudioConfigData[ele.config].path);
            this.audioIDs[objstr[i]] = null;
          }
        }
      };
      audioEffect = __decorate([ ccclass ], audioEffect);
      return audioEffect;
    }(cc.Component);
    exports.audioEffect = audioEffect;
    cc._RF.pop();
  }, {
    "../../../game/common/config/GameAudioConfig": "GameAudioConfig",
    "../../utils/MathUtil": "MathUtil",
    "../loader/ResLoader": "ResLoader"
  } ],
  AudioManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "bab30EYgsRIxL/FoByiJEc8", "AudioManager");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.AudioManager = void 0;
    var AudioEffect_1 = require("./AudioEffect");
    var AudioMusic_1 = require("./AudioMusic");
    var Engine_1 = require("../../Engine");
    var ViewModel_1 = require("../../libs/model-view/ViewModel");
    var Logger_1 = require("../log/Logger");
    var LOCAL_STORE_KEY = "game_audio";
    var AudioManager = function(_super) {
      __extends(AudioManager, _super);
      function AudioManager() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.vm = {};
        _this.local_data = {};
        _this._volume_music = 1;
        _this._volume_effect = 1;
        _this._switch_music = true;
        _this._switch_effect = true;
        _this._uuid = "10000";
        _this._localStorageTag = "AUDIO";
        return _this;
      }
      Object.defineProperty(AudioManager, "instance", {
        get: function() {
          if (null == this._instance) {
            var node = new cc.Node("UIAudioManager");
            cc.game.addPersistRootNode(node);
            this._instance = node.addComponent(AudioManager);
            this._instance.vm["Music"] = 0;
            this._instance.vm["Effect"] = 0;
            ViewModel_1.VM.add(this._instance.vm, "Sound");
            var music = new cc.Node("UIMusic");
            music.parent = node;
            this._instance.music = music.addComponent(AudioMusic_1.audioMusic);
            var effect = new cc.Node("UIEffect");
            effect.parent = node;
            this._instance.effect = effect.addComponent(AudioEffect_1.audioEffect);
            this._instance.init();
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      AudioManager.prototype.init = function() {
        var data = Engine_1.engine.storage.getItem(this._localStorageTag);
        if (data && "" != data) {
          try {
            this.local_data = JSON.parse(data);
            this._volume_music = this.local_data.volume_music;
            this._volume_effect = this.local_data.volume_effect;
            this._switch_music = this.local_data.switch_music;
            this._switch_effect = this.local_data.switch_effect;
            if ("undefined" === typeof this._volume_music || "undefined" === typeof this._volume_effect || "undefined" === typeof this._switch_effect || "undefined" === typeof this._switch_music) throw new Error("\u5b58\u50a8\u5185\u5bb9\u9519\u8bef\u6216\u5b58\u50a8\u952e\u540d\u51b2\u7a81");
            this.vm["Music"] = Number(!this._switch_music);
            this.vm["Effect"] = Number(!this._switch_effect);
          } catch (e) {
            Logger_1.Logger.erroring(e);
            this.local_data = {};
            this._volume_music = 1;
            this._volume_effect = 1;
            this._switch_music = true;
            this._switch_effect = true;
          }
          this.music.volume = this._volume_music;
          this.effect.volume = this._volume_effect;
        }
      };
      AudioManager.prototype.setUuid = function(value) {
        this._uuid = value;
        this._localStorageTag = LOCAL_STORE_KEY + "_" + this._uuid;
      };
      AudioManager.prototype.playMusic = function(url, callback) {
        void 0 === callback && (callback = null);
        if (this._switch_music) {
          this.music.load(url);
          this.music.onComplete = callback;
        }
      };
      AudioManager.prototype.playEffect = function(url, isLoop) {
        void 0 === isLoop && (isLoop = false);
        this._switch_effect && this.effect.load(url, isLoop);
      };
      AudioManager.prototype.playEffect2 = function(url) {
        this._switch_effect && this.effect.loadLoop(url);
      };
      Object.defineProperty(AudioManager.prototype, "musicVolume", {
        get: function() {
          return this._volume_music;
        },
        set: function(value) {
          this._volume_music = value;
          this.music.volume = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(AudioManager.prototype, "effectVolume", {
        get: function() {
          return this._volume_effect;
        },
        set: function(value) {
          this._volume_effect = value;
          this.effect.volume = value;
        },
        enumerable: false,
        configurable: true
      });
      AudioManager.prototype.getSwitchMusic = function() {
        this._switch_music ? this.vm["Music"] = 0 : this.vm["Music"] = 1;
        return this._switch_music;
      };
      AudioManager.prototype.setSwitchMusic = function(value) {
        this._switch_music = value;
        false == value && this.music.stop();
        this.getSwitchMusic();
        this.save();
      };
      AudioManager.prototype.MusicPause = function() {
        this.music.pause();
      };
      AudioManager.prototype.MusicResume = function() {
        this.music.resume();
      };
      AudioManager.prototype.getSwitchEffect = function() {
        this._switch_effect ? this.vm["Effect"] = 0 : this.vm["Effect"] = 1;
        return this._switch_effect;
      };
      AudioManager.prototype.setSwitchEffect = function(value) {
        this._switch_effect = value;
        false == value && this.effect.stop();
        this.getSwitchEffect();
        this.save();
      };
      AudioManager.prototype.replay = function() {
        if (this.music && this._switch_music) {
          var self = this;
          console.log("\u91cd\u65b0\u64ad\u653e\u97f3\u4e50");
          self.music.replay();
        }
      };
      AudioManager.prototype.resumeAll = function() {
        if (this.music) {
          this._switch_music && this.music.resume();
          this._switch_effect && this.effect.resume();
        }
      };
      AudioManager.prototype.pauseAll = function() {
        this.music && this.music.pause();
      };
      AudioManager.prototype.stopAll = function() {
        if (this.music) {
          this.music.stop();
          this.effect.stop();
        }
      };
      AudioManager.prototype.save = function() {
        this.local_data.volume_music = this._volume_music;
        this.local_data.volume_effect = this._volume_effect;
        this.local_data.switch_music = this._switch_music;
        this.local_data.switch_effect = this._switch_effect;
        var data = JSON.stringify(this.local_data);
        Engine_1.engine.storage.setItem(this._localStorageTag, data);
      };
      AudioManager.prototype.loadAuidoCache = function() {
        if (Engine_1.engine.storage.getItem(this._localStorageTag) || "" == Engine_1.engine.storage.getItem(this._localStorageTag)) {
          var data = JSON.parse(Engine_1.engine.storage.getItem(this._localStorageTag));
          this._volume_music = data.volume_music;
          this._volume_effect = data.volume_effect;
          this._switch_music = data.switch_music;
          this._switch_effect = data.switch_effect;
          this.getSwitchEffect();
          this.getSwitchMusic();
        } else {
          this.local_data.volume_music = this._volume_music;
          this.local_data.volume_effect = this._volume_effect;
          this.local_data.switch_music = this._switch_music;
          this.local_data.switch_effect = this._switch_effect;
          var data = JSON.stringify(this.local_data);
          Engine_1.engine.storage.setItem(this._localStorageTag, data);
        }
      };
      return AudioManager;
    }(cc.Component);
    exports.AudioManager = AudioManager;
    cc._RF.pop();
  }, {
    "../../Engine": "Engine",
    "../../libs/model-view/ViewModel": "ViewModel",
    "../log/Logger": "Logger",
    "./AudioEffect": "AudioEffect",
    "./AudioMusic": "AudioMusic"
  } ],
  AudioMusic: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c6e89USAe9B2JPFOcqEsMyM", "AudioMusic");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.audioMusic = void 0;
    var GameAudioConfig_1 = require("../../../game/common/config/GameAudioConfig");
    var ResLoader_1 = require("../loader/ResLoader");
    var _a = cc._decorator, ccclass = _a.ccclass, menu = _a.menu;
    var audioMusic = function(_super) {
      __extends(audioMusic, _super);
      function audioMusic() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.onComplete = null;
        _this._progress = 0;
        _this._url = null;
        _this._isPlay = false;
        return _this;
      }
      audioMusic.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
        this.loop = true;
      };
      Object.defineProperty(audioMusic.prototype, "progress", {
        get: function() {
          this._progress = this.getCurrentTime() / this.getDuration();
          return this._progress;
        },
        set: function(value) {
          this._progress = value;
          this.setCurrentTime(value * this.getDuration());
        },
        enumerable: false,
        configurable: true
      });
      audioMusic.prototype.load = function(auidoID, callback) {
        var config = GameAudioConfig_1.AudioConfigData[auidoID];
        var self = this;
        config ? ResLoader_1.resLoader.load(config.bundle, config.path, cc.AudioClip, function(err, data) {
          err && cc.error(err);
          self.isPlaying && self.stop();
          self.clip = data;
          self.setCurrentTime(0);
          self.play();
          callback && callback();
          self._url = config;
        }) : console.error("\u6b64\u97f3\u9891ID\u6ca1\u6709\u914d\u7f6e" + auidoID);
      };
      audioMusic.prototype.replay = function() {
        var _this = this;
        this._url && ResLoader_1.resLoader.load(this._url.bundle, this._url.path, cc.AudioClip, function(err, data) {
          err && cc.error(err);
          if (_this.isPlaying) {
            _this.stop();
            ResLoader_1.resLoader.releaseDir(_this._url.path, _this._url.bundle);
          }
          _this.clip = data;
          _this.setCurrentTime(0);
          _this.play();
        });
      };
      audioMusic.prototype.update = function(dt) {
        this.getCurrentTime() > 0 && (this._isPlay = true);
        if (this._isPlay && false == this.isPlaying) {
          this._isPlay = false;
          this.onComplete && this.onComplete();
        }
      };
      audioMusic.prototype.release = function() {
        if (this._url) {
          ResLoader_1.resLoader.releaseDir(this._url.path, this._url.bundle);
          this._url = null;
        }
      };
      audioMusic = __decorate([ ccclass ], audioMusic);
      return audioMusic;
    }(cc.AudioSource);
    exports.audioMusic = audioMusic;
    cc._RF.pop();
  }, {
    "../../../game/common/config/GameAudioConfig": "GameAudioConfig",
    "../loader/ResLoader": "ResLoader"
  } ],
  Ball: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "35b46dwLWZJi6VV4n/NPPcc", "Ball");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ballState = void 0;
    var PaoGame_1 = require("./PaoGame");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var ballState;
    (function(ballState) {
      ballState[ballState["none"] = 0] = "none";
      ballState[ballState["downing"] = 1] = "downing";
      ballState[ballState["attaching"] = 2] = "attaching";
      ballState[ballState["paoing"] = 3] = "paoing";
    })(ballState = exports.ballState || (exports.ballState = {}));
    var Ball = function(_super) {
      __extends(Ball, _super);
      function Ball() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.rotationSpeed = 400;
        _this.state = ballState.none;
        _this.target = null;
        _this.rigidBody = null;
        _this.delay = 0;
        _this.baseWidth = 200;
        _this.baseSpeed = 400;
        return _this;
      }
      Ball.prototype.start = function() {
        PaoGame_1.default.instance.ball = this;
        this.rigidBody = this.getComponent(cc.RigidBody);
        this.rigidBody.type = cc.RigidBodyType.Static;
        this.node.setPosition(this.node.position.x - PaoGame_1.default.instance.node.position.x, this.node.position.y - PaoGame_1.default.instance.node.position.y);
      };
      Ball.prototype.update = function(dt) {
        if (this.state == ballState.attaching) {
          this.rigidBody.type == cc.RigidBodyType.Dynamic && (this.rigidBody.type = cc.RigidBodyType.Static);
          var raddel = cc.misc.degreesToRadians(this.rotationSpeed * dt);
          var pointposition = cc.Vec3.rotateZ(new cc.Vec3(), this.node.position, this.target.position, raddel);
          this.node.setPosition(pointposition);
        }
        this.delay > 0 && (this.delay -= dt);
      };
      Ball.prototype.onBeginContact = function(contact, selfCollider, otherCollider) {
        if (this.target == otherCollider.node && this.delay > 0) return;
        this.target = otherCollider.node;
        this.rotationSpeed = this.baseSpeed * this.baseWidth / this.target.width;
        this.state = ballState.attaching;
        this.onAttach();
      };
      Ball.prototype.onAttach = function() {
        PaoGame_1.default.instance.onBallAttach(this.target);
      };
      Ball.prototype.begin = function() {
        this.state = ballState.downing;
        this.rigidBody.type = cc.RigidBodyType.Dynamic;
      };
      Ball.prototype.pao = function() {
        this.delay = 1;
        this.state = ballState.paoing;
        this.rigidBody.type = cc.RigidBodyType.Dynamic;
        var relativeVec = new cc.Vec2(-this.node.position.y + this.target.position.y, this.node.position.x - this.target.position.x);
        this.rigidBody.linearVelocity = relativeVec.normalize().multiplyScalar(this.rotationSpeed);
      };
      Ball.prototype.input = function() {
        this.state == ballState.none ? this.begin() : this.state == ballState.attaching && this.pao();
      };
      Ball = __decorate([ ccclass ], Ball);
      return Ball;
    }(cc.Component);
    exports.default = Ball;
    cc._RF.pop();
  }, {
    "./PaoGame": "PaoGame"
  } ],
  Bezier: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "63fc1q7AttHEr0vRPU+gCVR", "Bezier");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Bezier = function(_super) {
      __extends(Bezier, _super);
      function Bezier() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.p1Tracker = null;
        _this.p2Tracker = null;
        _this.random = false;
        _this.debug = false;
        _this.p1 = null;
        _this.c1 = null;
        _this.c2 = null;
        _this.p2 = null;
        _this.g = null;
        return _this;
      }
      Bezier.prototype.onLoad = function() {
        this.g = this.getComponent(cc.Graphics);
        this.p1 = this.node.getChildByName("p1");
        this.c1 = this.node.getChildByName("c1");
        this.c2 = this.node.getChildByName("c2");
        this.p2 = this.node.getChildByName("p2");
        if (!cc.sys.isMobile) {
          this.p1.active = false;
          this.c1.active = false;
          this.c2.active = false;
          this.p2.active = false;
        }
      };
      Bezier.prototype.startMove = function(node, nodeEnd, time, callback, obsv) {
        void 0 === callback && (callback = null);
        void 0 === obsv && (obsv = null);
        this.p1Tracker = node;
        this.p2Tracker = nodeEnd;
        this.updateTracker();
        var startPos = node.position;
        var points = this.getBezierPoints(node);
        node.setPosition(points[0]);
        var mixX = points[1].x;
        var mixY = points[1].y;
        var maxX = points[2].x;
        var maxY = points[2].y;
        var progressX = function(start, end, current, t) {
          current = bezier(start, mixX, maxX, end, t);
          return current;
        };
        var progressY = function(start, end, current, t) {
          current = bezier(start, mixY, maxY, end, t);
          return current;
        };
        cc.tween(startPos).parallel(cc.tween().to(time, {
          x: points[3].x
        }, {
          progress: progressX,
          easing: "smooth",
          onUpdate: function() {
            node.setPosition(startPos);
          }
        }), cc.tween().to(time, {
          y: points[3].y
        }, {
          progress: progressY,
          easing: "smooth",
          onUpdate: function() {
            node.setPosition(startPos);
          }
        })).call(function() {
          callback && callback.call(obsv, node);
        }).start();
      };
      Bezier.prototype.startMove2 = function(node, time, callback, obsv) {
        void 0 === callback && (callback = null);
        void 0 === obsv && (obsv = null);
        this.updateTracker();
        var startPos = node.position;
        var points = this.getBezierPoints(node);
        node.setPosition(points[0]);
        var mixX = points[1].x;
        var mixY = points[1].y;
        var maxX = points[2].x;
        var maxY = points[2].y;
        var progressX = function(start, end, current, t) {
          current = bezier(start, mixX, maxX, end, t);
          return current;
        };
        var progressY = function(start, end, current, t) {
          current = bezier(start, mixY, maxY, end, t);
          return current;
        };
        cc.tween(startPos).parallel(cc.tween().to(time, {
          x: points[3].x
        }, {
          progress: progressX,
          easing: "smooth",
          onUpdate: function() {
            node.setPosition(startPos);
          }
        }), cc.tween().to(time, {
          y: points[3].y
        }, {
          progress: progressY,
          easing: "smooth",
          onUpdate: function() {
            node.setPosition(startPos);
          }
        })).call(function() {
          callback && callback.call(obsv, node);
        }).start();
      };
      Bezier.prototype.getBezierPoints = function(node) {
        var p1 = this.convertToNodeSpace(node, this.p1);
        var c1 = this.convertToNodeSpace(node, this.c1);
        var c2 = this.convertToNodeSpace(node, this.c2);
        var p2 = this.convertToNodeSpace(node, this.p2);
        if (this.random) {
          var mc1 = this.calcMirrorPoint(p1, p2, c1);
          c1 = this.getRandomPoint(c1, mc1);
          var mc2 = this.calcMirrorPoint(p1, p2, c2);
          c2 = this.getRandomPoint(c2, mc2);
        }
        return [ cc.v3(p1.x, p1.y, p1.z), cc.v3(c1.x, c1.y, c1.z), cc.v3(c2.x, c2.y, c2.z), cc.v3(p2.x, p2.y, p2.z) ];
      };
      Bezier.prototype.updateTracker = function() {
        if (this.p1Tracker) {
          var nodePos = this.convertToNodeSpace(this.p1, this.p1Tracker);
          this.p1.setPosition(nodePos);
        }
        if (this.p2Tracker) {
          var nodePos = this.convertToNodeSpace(this.p2, this.p2Tracker);
          this.p2.setPosition(nodePos);
        }
      };
      Bezier.prototype.update = function() {
        if (EDITOR) {
          this.updateTracker();
          this.draw();
        } else this.debug && this.draw();
      };
      Bezier.prototype.draw = function() {
        if (!this.debug && !EDITOR) return;
        if (!this.p1 || !this.c1 || !this.c2 || !this.p2) {
          this.g.clear();
          return;
        }
        var p1 = this.p1.position;
        var c1 = this.c1.position;
        var c2 = this.c2.position;
        var p2 = this.p2.position;
        this.g.clear();
        this.g.moveTo(p1.x, p1.y);
        this.g.bezierCurveTo(c1.x, c1.y, c2.x, c2.y, p2.x, p2.y);
        this.g.stroke();
      };
      Bezier.prototype.convertToNodeSpace = function(p1, p2) {
        var pos = p2.parent.convertToWorldSpaceAR(p2.position);
        return p1.parent.convertToNodeSpaceAR(pos);
      };
      Bezier.prototype.calcMirrorPoint = function(A, B, C) {
        var AB = new cc.Vec3();
        cc.Vec3.subtract(AB, B, A);
        var AC = new cc.Vec3();
        cc.Vec3.subtract(AC, C, A);
        var SUM = AB.dot(AC);
        var radian = SUM / (AB.length() * AC.length());
        var tyLen = AC.length() * radian;
        var AE = AB.normalize().multiplyScalar(tyLen);
        var E = new cc.Vec3();
        cc.Vec3.add(E, A, AE);
        var CE = new cc.Vec3();
        cc.Vec3.subtract(CE, E, C);
        var CE2 = CE.multiplyScalar(2);
        var D = new cc.Vec3();
        cc.Vec3.add(D, C, CE2);
        return D;
      };
      Bezier.prototype.getRandomPoint = function(A, B) {
        var AB = new cc.Vec3();
        cc.Vec3.subtract(AB, B, A);
        var RAC = AB.multiplyScalar(Math.random());
        var RES = new cc.Vec3();
        return cc.Vec3.add(RES, A, RAC);
      };
      __decorate([ property(cc.Node) ], Bezier.prototype, "p1Tracker", void 0);
      __decorate([ property({
        type: cc.Node,
        tooltip: "\u7ec8\u6b62\u70b9\u8ffd\u8e2a\u5668"
      }) ], Bezier.prototype, "p2Tracker", void 0);
      __decorate([ property({
        tooltip: "\u662f\u5426\u968f\u673a"
      }) ], Bezier.prototype, "random", void 0);
      __decorate([ property({
        tooltip: "\u8fd0\u884c\u65f6\u663e\u793aBezier\u66f2\u7ebf",
        visible: function() {
          var line = this.g;
          this.debug ? line.lineWidth = 5 : line.lineWidth = 0;
          return true;
        }
      }) ], Bezier.prototype, "debug", void 0);
      Bezier = __decorate([ ccclass ], Bezier);
      return Bezier;
    }(cc.Component);
    exports.default = Bezier;
    cc._RF.pop();
  }, {} ],
  Board: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "485ddkpx9pHcbQwjyKe+Pi6", "Board");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var pro_screwlevel_1 = require("./pro_screwlevel");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Board = function(_super) {
      __extends(Board, _super);
      function Board() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      Board.prototype.start = function() {
        this.node.on(cc.Node.EventType.TOUCH_START, function(event) {
          pro_screwlevel_1.default.instance.CurScrew && (pro_screwlevel_1.default.instance.CurScrew.isUp = false);
        }, this);
        for (var i = 0; i < this.node.children.length; i++) {
          var element = this.node.children[i];
          element.on(cc.Node.EventType.TOUCH_START, function(event) {
            pro_screwlevel_1.default.instance.onClickHole(event);
          }, this);
        }
        pro_screwlevel_1.default.instance.regesitBoard(this);
      };
      Board.prototype.update = function(dt) {
        this.node.position.y < -cc.view.getVisibleSize().height && this.destroy();
      };
      Board.prototype.onDestroy = function() {
        pro_screwlevel_1.default.instance.unRegesitBoard(this);
        pro_screwlevel_1.default.instance.checkWin();
      };
      Board = __decorate([ ccclass ], Board);
      return Board;
    }(cc.Component);
    exports.default = Board;
    cc._RF.pop();
  }, {
    "./pro_screwlevel": "pro_screwlevel"
  } ],
  BuildTimeConstants: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "061b9fvS0ZFNLNl8Xcj31Qk", "BuildTimeConstants");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.BuildTimeConstants = void 0;
    var BuildTimeConstants = function() {
      function BuildTimeConstants() {}
      return BuildTimeConstants;
    }();
    exports.BuildTimeConstants = BuildTimeConstants;
    cc._RF.pop();
  }, {} ],
  ButtonClickSimple: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8082aMe85lBv4uZPMfP8/R+", "ButtonClickSimple");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var ButtonClickSimple = function(_super) {
      __extends(ButtonClickSimple, _super);
      function ButtonClickSimple() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.once = false;
        _this.interval = 500;
        _this.touchCount = 0;
        _this.touchtEndTime = 0;
        _this.clickEvent = [];
        return _this;
      }
      ButtonClickSimple.prototype.onLoad = function() {
        this.node.on(cc.Node.EventType.TOUCH_END, this.onclick, this);
        this.clickButton = this.node.getComponent(cc.Button);
      };
      ButtonClickSimple.prototype.start = function() {
        this.clickEvent = this.clickButton.clickEvents.concat();
        this.clickButton.clickEvents = [];
      };
      ButtonClickSimple.prototype.onclick = function(event) {
        if (this.once) {
          if (this.touchCount > 0) {
            event.stopPropagation();
            return;
          }
          this.touchCount++;
        }
        console.log("Events:" + this.clickButton.clickEvents);
        console.log("Event:" + this.clickEvent);
        console.log("touchEndtime:" + this.touchtEndTime);
        console.log("gameTotaltime:" + cc.director.getTotalTime());
        if (this.touchtEndTime && cc.director.getTotalTime() - this.touchtEndTime < this.interval) this.clickButton.clickEvents = []; else {
          this.touchtEndTime = cc.director.getTotalTime();
          this.clickButton.clickEvents = this.clickEvent;
        }
      };
      ButtonClickSimple.prototype.onDestroy = function() {
        this.node.off(cc.Node.EventType.TOUCH_END, this.onclick, this);
      };
      __decorate([ property({
        tooltip: "\u662f\u5426\u53ea\u80fd\u89e6\u53d1\u4e00\u6b21"
      }) ], ButtonClickSimple.prototype, "once", void 0);
      __decorate([ property({
        tooltip: "\u6bcf\u6b21\u89e6\u53d1\u95f4\u9694"
      }) ], ButtonClickSimple.prototype, "interval", void 0);
      ButtonClickSimple = __decorate([ ccclass, menu("ui/button/ButtonClickSimple") ], ButtonClickSimple);
      return ButtonClickSimple;
    }(cc.Component);
    exports.default = ButtonClickSimple;
    cc._RF.pop();
  }, {} ],
  ButtonEffect: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d9ae3rFjDdI7paG7DFP7BGu", "ButtonEffect");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ButtonSimple_1 = require("./ButtonSimple");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var ButtonEffect = function(_super) {
      __extends(ButtonEffect, _super);
      function ButtonEffect() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.disabledEffect = false;
        return _this;
      }
      ButtonEffect.prototype.onLoad = function() {
        this.anim = this.node.addComponent(cc.Animation);
        _super.prototype.onLoad.call(this);
      };
      ButtonEffect.prototype.onTouchtStart = function(event) {
        this.disabledEffect || this.anim.play("button_scale_start");
      };
      ButtonEffect.prototype.onTouchEnd = function(event) {
        this.disabledEffect || this.anim.play("button_scale_end");
        _super.prototype.onTouchEnd.call(this, event);
      };
      __decorate([ property({
        tooltip: "\u662f\u5426\u5f00\u542f"
      }) ], ButtonEffect.prototype, "disabledEffect", void 0);
      ButtonEffect = __decorate([ ccclass, menu("ui/button/ButtonEffect") ], ButtonEffect);
      return ButtonEffect;
    }(ButtonSimple_1.default);
    exports.default = ButtonEffect;
    cc._RF.pop();
  }, {
    "./ButtonSimple": "ButtonSimple"
  } ],
  ButtonSimple: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8cfa2lLvmxClqGH7IXoGJ9L", "ButtonSimple");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var ButtonSimple = function(_super) {
      __extends(ButtonSimple, _super);
      function ButtonSimple() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.once = false;
        _this.interval = 500;
        _this.touchCount = 0;
        _this.touchtEndTime = 0;
        return _this;
      }
      ButtonSimple.prototype.onLoad = function() {
        this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchtStart, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
      };
      ButtonSimple.prototype.onTouchtStart = function(event) {};
      ButtonSimple.prototype.onTouchEnd = function(event) {
        if (this.once) {
          if (this.touchCount > 0) {
            event.stopPropagation();
            return;
          }
          this.touchCount++;
        }
        this.touchtEndTime && cc.director.getTotalTime() - this.touchtEndTime < this.interval ? event.stopPropagation() : this.touchtEndTime = cc.director.getTotalTime();
      };
      ButtonSimple.prototype.onDestroy = function() {
        this.node.off(cc.Node.EventType.TOUCH_START, this.onTouchtStart, this);
        this.node.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
      };
      __decorate([ property({
        tooltip: "\u662f\u5426\u53ea\u80fd\u89e6\u53d1\u4e00\u6b21"
      }) ], ButtonSimple.prototype, "once", void 0);
      __decorate([ property({
        tooltip: "\u6bcf\u6b21\u89e6\u53d1\u95f4\u9694"
      }) ], ButtonSimple.prototype, "interval", void 0);
      ButtonSimple = __decorate([ ccclass, menu("ui/button/ButtonSimple") ], ButtonSimple);
      return ButtonSimple;
    }(cc.Component);
    exports.default = ButtonSimple;
    cc._RF.pop();
  }, {} ],
  CableShape: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cad60VwwwNDp7tgzyPZUuYD", "CableShape");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var CableShape = function(_super) {
      __extends(CableShape, _super);
      function CableShape() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.holePfb = null;
        _this.screwPfb = null;
        _this.success = null;
        _this.col = 5;
        _this.row = 5;
        _this.offset = 100;
        _this.target = [ 2, 8, 4, 10, 15, 19, 23, 17, 11, 6 ];
        _this.now = [ 2, 3, 4, 9, 14, 19, 18, 17, 12, 7 ];
        _this.holes = [];
        _this.screws = [];
        _this.curScrew = null;
        _this.graphics = null;
        _this.targetOffsetY = 350;
        _this.targetScale = 2;
        return _this;
      }
      CableShape.prototype.start = function() {
        for (var i = 0; i < this.row; i++) for (var j = 0; j < this.col; j++) {
          var hole = cc.instantiate(this.holePfb);
          hole.parent = this.node;
          hole.position = cc.v3((j - Math.floor(this.col / 2)) * this.offset, (Math.floor(this.row / 2) - i) * this.offset, 0);
          this.holes.push(hole);
        }
        this.initGraphics(this.node);
        for (var i = 0; i < this.target.length; i++) {
          this.target[i]--;
          this.now[i]--;
          var screw = cc.instantiate(this.screwPfb);
          screw.parent = this.node;
          screw.position = this.holes[this.now[i]].position;
          this.screws.push(screw);
          screw.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          screw.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
          screw.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
        }
        this.drawLines();
      };
      CableShape.prototype.initGraphics = function(parent) {
        var node = new cc.Node();
        parent.addChild(node);
        this.graphics = node.addComponent(cc.Graphics);
        this.graphics.strokeColor = cc.Color.RED;
        this.graphics.lineWidth = 5;
        var size = cc.view.getVisibleSize();
      };
      CableShape.prototype.onTouchMove = function(event) {
        var screw = event.target;
        var pos = event.getLocation();
        pos = cc.Camera.main.getCameraToWorldPoint(pos);
        var local = screw.parent.convertToNodeSpaceAR(pos);
        screw.position = cc.v3(local);
        this.drawLines();
      };
      CableShape.prototype.drawTargetLines = function() {
        this.graphics.strokeColor = cc.Color.BLACK;
        this.graphics.lineWidth = 10;
        for (var i = 0; i < this.target.length; i++) {
          var moveToIndex = this.target[i];
          this.graphics.moveTo(this.holes[moveToIndex].position.x / 2, this.holes[moveToIndex].position.y / 2 + this.targetOffsetY);
          var lineToIndex = i + 1;
          lineToIndex >= this.target.length && (lineToIndex = 0);
          lineToIndex = this.target[lineToIndex];
          this.graphics.lineTo(this.holes[lineToIndex].position.x / 2, this.holes[lineToIndex].position.y / 2 + this.targetOffsetY);
        }
        this.graphics.stroke();
      };
      CableShape.prototype.drawLines = function() {
        this.graphics.clear();
        this.drawTargetLines();
        this.graphics.strokeColor = cc.Color.RED;
        this.graphics.lineWidth = 20;
        for (var i = 0; i < this.screws.length; i++) {
          this.graphics.moveTo(this.screws[i].position.x, this.screws[i].position.y);
          var lineToIndex = i + 1;
          lineToIndex >= this.screws.length && (lineToIndex = 0);
          this.graphics.lineTo(this.screws[lineToIndex].position.x, this.screws[lineToIndex].position.y);
        }
        this.graphics.stroke();
      };
      CableShape.prototype.onTouchEnd = function(event) {
        var screw = event.target;
        var pos = event.getLocation();
        pos = cc.Camera.main.getCameraToWorldPoint(pos);
        var local = screw.parent.convertToNodeSpaceAR(pos);
        var holeInfo = this.getHoleInfoByPos(local);
        if (null == holeInfo || this.isHoleHasScrew(holeInfo.index)) this.resetScrewPos(screw); else {
          this.moveScrewToHole(screw, holeInfo);
          this.checkWin() && (cc.instantiate(this.success).parent = this.node);
        }
        this.drawLines();
      };
      CableShape.prototype.moveScrewToHole = function(screw, holeInfo) {
        var screwIndex = this.screws.indexOf(screw);
        this.now[screwIndex] = holeInfo.index;
        screw.position = holeInfo.hole.position;
      };
      CableShape.prototype.resetScrewPos = function(screw) {
        var screwIndex = this.screws.indexOf(screw);
        var holeIndex = this.now[screwIndex];
        var hole = this.holes[holeIndex];
        screw.position = hole.position;
      };
      CableShape.prototype.isHoleHasScrew = function(index) {
        for (var i = 0; i < this.now.length; i++) {
          var element = this.now[i];
          if (element == index) return true;
        }
        return false;
      };
      CableShape.prototype.getHoleInfoByPos = function(pos) {
        for (var i = 0; i < this.holes.length; i++) {
          var element = this.holes[i];
          if (cc.Vec3.distance(element.position, pos) < element.width / 2) return {
            index: i,
            hole: element
          };
        }
        return null;
      };
      CableShape.prototype.getStartIndex = function() {
        for (var i = 0; i < this.target.length; i++) for (var j = 0; j < this.now.length; j++) if (this.target[i] == this.now[j]) return j;
      };
      CableShape.prototype.checkWin = function() {
        var index = this.getStartIndex();
        for (var i = 0; i < this.target.length; i++) if (this.target[i] != this.now[(i + index) % this.target.length]) return false;
        return true;
      };
      __decorate([ property(cc.Prefab) ], CableShape.prototype, "holePfb", void 0);
      __decorate([ property(cc.Prefab) ], CableShape.prototype, "screwPfb", void 0);
      __decorate([ property(cc.Prefab) ], CableShape.prototype, "success", void 0);
      CableShape = __decorate([ ccclass ], CableShape);
      return CableShape;
    }(cc.Component);
    exports.default = CableShape;
    cc._RF.pop();
  }, {} ],
  CameraFollow: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "158d1S5Yi9Is79BWUlAtwMJ", "CameraFollow");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PaoGame_1 = require("./PaoGame");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var CameraFollow = function(_super) {
      __extends(CameraFollow, _super);
      function CameraFollow() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      CameraFollow.prototype.start = function() {
        PaoGame_1.default.instance.cameraFollow = this;
      };
      CameraFollow.prototype.adjustCamera = function(pos) {
        var newPos = this.node.position.clone().add(pos);
        cc.tween(this.node).to(1, {
          position: newPos
        }).start();
      };
      CameraFollow = __decorate([ ccclass ], CameraFollow);
      return CameraFollow;
    }(cc.Component);
    exports.default = CameraFollow;
    cc._RF.pop();
  }, {
    "./PaoGame": "PaoGame"
  } ],
  CameraUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "afb928lqyhO1602C8x/wulN", "CameraUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.CameraUtil = void 0;
    var CameraUtil = function() {
      function CameraUtil() {}
      CameraUtil.isInView = function(camera, worldPos) {
        var cameraPos = camera.node.getWorldPosition();
        var viewPos = camera.worldToScreen(worldPos);
        var dir = cc.Vec3.normalize(new cc.Vec3(), worldPos.subtract(cameraPos));
        var forward = camera.node.forward;
        var dot = cc.Vec3.dot(forward, dir);
        var viewportRect = view.getViewportRect();
        return dot > 0 && viewPos.x <= viewportRect.width && viewPos.x >= 0 && viewPos.y <= viewportRect.height && viewPos.y >= 0;
      };
      return CameraUtil;
    }();
    exports.CameraUtil = CameraUtil;
    cc._RF.pop();
  }, {} ],
  Circle: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "a6c0fx1jUpOurMva2X/291U", "Circle");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PaoGame_1 = require("./PaoGame");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Circle = function(_super) {
      __extends(Circle, _super);
      function Circle() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      Circle.prototype.start = function() {
        PaoGame_1.default.instance.register(this);
        this.node.setPosition(this.node.position.x - PaoGame_1.default.instance.node.position.x, this.node.position.y - PaoGame_1.default.instance.node.position.y);
      };
      Circle = __decorate([ ccclass ], Circle);
      return Circle;
    }(cc.Component);
    exports.default = Circle;
    cc._RF.pop();
  }, {
    "./PaoGame": "PaoGame"
  } ],
  CocosHelper: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9d79834BkRK/42lE7zRHxIz", "CocosHelper");
    "use strict";
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LoadProgress = void 0;
    var SysDefine_1 = require("./SysDefine");
    var LoadProgress = function() {
      function LoadProgress() {}
      return LoadProgress;
    }();
    exports.LoadProgress = LoadProgress;
    var CocosHelper = function() {
      function CocosHelper() {}
      CocosHelper.runRepeatTweenSync = function(target, repeat) {
        var tweens = [];
        for (var _i = 2; _i < arguments.length; _i++) tweens[_i - 2] = arguments[_i];
        return __awaiter(this, void 0, void 0, function() {
          return __generator(this, function(_a) {
            return [ 2, new Promise(function(resolve, reject) {
              var selfTween = cc.tween(target);
              for (var _i = 0, tweens_1 = tweens; _i < tweens_1.length; _i++) {
                var tmpTween = tweens_1[_i];
                selfTween = selfTween.then(tmpTween);
              }
              repeat < 0 ? cc.tween(target).repeatForever(selfTween).start() : cc.tween(target).repeat(repeat, selfTween).start();
            }) ];
          });
        });
      };
      CocosHelper.runTweenSync = function(target) {
        var tweens = [];
        for (var _i = 1; _i < arguments.length; _i++) tweens[_i - 1] = arguments[_i];
        return __awaiter(this, void 0, Promise, function() {
          return __generator(this, function(_a) {
            return [ 2, new Promise(function(resolve, reject) {
              var selfTween = cc.tween(target);
              for (var _i = 0, tweens_2 = tweens; _i < tweens_2.length; _i++) {
                var tmpTween = tweens_2[_i];
                selfTween = selfTween.then(tmpTween);
              }
              selfTween.call(function() {
                resolve();
              }).start();
            }) ];
          });
        });
      };
      CocosHelper.prototype.stopTween = function(target) {
        cc.Tween.stopAllByTarget(target);
      };
      CocosHelper.prototype.stopTweenByTag = function(tag) {
        cc.Tween.stopAllByTag(tag);
      };
      CocosHelper.runActionSync = function(node) {
        var actions = [];
        for (var _i = 1; _i < arguments.length; _i++) actions[_i - 1] = arguments[_i];
        return __awaiter(this, void 0, void 0, function() {
          return __generator(this, function(_a) {
            if (!actions || actions.length <= 0) return [ 2 ];
            return [ 2, new Promise(function(resolve, reject) {
              actions.push(cc.callFunc(function() {
                resolve(true);
              }));
              node.runAction(cc.sequence(actions));
            }) ];
          });
        });
      };
      CocosHelper.runAnimSync = function(node, animName) {
        return __awaiter(this, void 0, void 0, function() {
          var anim, clip, clips, i;
          return __generator(this, function(_a) {
            switch (_a.label) {
             case 0:
              anim = node.getComponent(cc.Animation);
              if (!anim) return [ 2 ];
              clip = null;
              if (animName) {
                clips = anim.getClips();
                if ("number" === typeof animName) clip = clips[animName]; else if ("string" === typeof animName) for (i = 0; i < clips.length; i++) if (clips[i].name === animName) {
                  clip = clips[i];
                  break;
                }
              } else clip = anim.defaultClip;
              if (!clip) return [ 2 ];
              return [ 4, CocosHelper.sleepSync(clip.duration) ];

             case 1:
              _a.sent();
              return [ 2 ];
            }
          });
        });
      };
      CocosHelper.loadResThrowErrorSync = function(url, type, progressCallback) {
        return null;
      };
      CocosHelper.loadResSync = function(url, type, progressCallback) {
        var _this = this;
        if (!url || !type) {
          cc.error("\u53c2\u6570\u9519\u8bef", url, type);
          return;
        }
        CocosHelper.loadProgress.url = url;
        progressCallback && (this.loadProgress.cb = progressCallback);
        return new Promise(function(resolve, reject) {
          cc.loader.loadRes(url, type, _this._progressCallback, function(err, asset) {
            if (err) {
              cc.error(url + " [\u8d44\u6e90\u52a0\u8f7d] \u9519\u8bef " + err);
              resolve(null);
            } else resolve(asset);
            CocosHelper.loadProgress.url = "";
            CocosHelper.loadProgress.completedCount = 0;
            CocosHelper.loadProgress.totalCount = 0;
            CocosHelper.loadProgress.item = null;
            CocosHelper.loadProgress.cb = null;
          });
        });
      };
      CocosHelper._progressCallback = function(completedCount, totalCount, item) {
        CocosHelper.loadProgress.completedCount = completedCount;
        CocosHelper.loadProgress.totalCount = totalCount;
        CocosHelper.loadProgress.item = item;
        CocosHelper.loadProgress.cb && CocosHelper.loadProgress.cb(completedCount, totalCount, item);
      };
      CocosHelper.findChildInNode = function(nodeName, rootNode) {
        if (rootNode.name == nodeName) return rootNode;
        for (var i = 0; i < rootNode.childrenCount; i++) {
          var node = this.findChildInNode(nodeName, rootNode.children[i]);
          if (node) return node;
        }
        return null;
      };
      CocosHelper.checkNodePrefix = function(name) {
        if (name[0] !== SysDefine_1.SysDefine.SYS_STANDARD_Prefix) return false;
        return true;
      };
      CocosHelper.checkBindChildren = function(name) {
        if (name[name.length - 1] !== SysDefine_1.SysDefine.SYS_STANDARD_End) return true;
        return false;
      };
      CocosHelper.getPrefixNames = function(name) {
        if (null === name) return;
        return name.split(SysDefine_1.SysDefine.SYS_STANDARD_Separator);
      };
      CocosHelper.getComponentName = function(com) {
        var arr = com.name.match(/<.*>$/);
        if (arr && arr.length > 0) return arr[0].slice(1, -1);
        return com.name;
      };
      CocosHelper.loadBundleSync = function(url, options) {
        return new Promise(function(resolve, reject) {
          cc.assetManager.loadBundle(url, options, function(err, bundle) {
            if (err) resolve(bundle); else {
              cc.error("\u52a0\u8f7dbundle\u5931\u8d25, url: " + url + ", err:" + err);
              resolve(null);
            }
          });
        });
      };
      CocosHelper.loadAssetFromBundleSync = function(bundleName, url) {
        var bundle = cc.assetManager.getBundle(bundleName);
        if (!bundle) {
          cc.error("\u52a0\u8f7dbundle\u4e2d\u7684\u8d44\u6e90\u5931\u8d25, \u672a\u627e\u5230bundle, bundleUrl:" + bundleName);
          return null;
        }
        return new Promise(function(resolve, reject) {});
      };
      CocosHelper.loadAssetSync = function(url) {
        return new Promise(function(resolve, reject) {});
      };
      CocosHelper.releaseAsset = function(assets) {
        this.decRes(assets);
      };
      CocosHelper.addRef = function(assets) {
        if (assets instanceof Array) for (var _i = 0, assets_1 = assets; _i < assets_1.length; _i++) {
          var a = assets_1[_i];
          a.addRef();
        } else assets.addRef();
      };
      CocosHelper.decRes = function(assets) {
        if (assets instanceof Array) for (var _i = 0, assets_2 = assets; _i < assets_2.length; _i++) {
          var a = assets_2[_i];
          a.decRef();
        } else assets.decRef();
      };
      CocosHelper.testForCallback = function(callback) {
        var a = 1;
        setTimeout(function() {
          callback(a);
        }, 1e3);
        return a;
      };
      CocosHelper.captureScreen = function(camera, prop) {
        var newTexture = new cc.RenderTexture();
        var oldTexture = camera.targetTexture;
        var rect = cc.rect(0, 0, cc.visibleRect.width, cc.visibleRect.height);
        prop && (rect = prop instanceof cc.Node ? prop.getBoundingBoxToWorld() : prop);
        newTexture.initWithSize(cc.visibleRect.width, cc.visibleRect.height, cc.game._renderContext.STENCIL_INDEX8);
        camera.targetTexture = newTexture;
        camera.render();
        camera.targetTexture = oldTexture;
        var buffer = new ArrayBuffer(rect.width * rect.height * 4);
        var data = new Uint8Array(buffer);
        newTexture.readPixels(data, rect.x, rect.y, rect.width, rect.height);
        return data;
      };
      CocosHelper.loadProgress = new LoadProgress();
      CocosHelper.sleepSync = function(time) {
        return new Promise(function(resolve, reject) {
          setTimeout(function() {
            resolve(true);
          }, 1e3 * time);
        });
      };
      return CocosHelper;
    }();
    exports.default = CocosHelper;
    cc._RF.pop();
  }, {
    "./SysDefine": "SysDefine"
  } ],
  CommonPrompt: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "94d10x4svpIyrcmjAK064IQ", "CommonPrompt");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../Engine");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var CommonPrompt = function(_super) {
      __extends(CommonPrompt, _super);
      function CommonPrompt() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.lab_title = null;
        _this.lab_content = null;
        _this.lab_ok = null;
        _this.lab_cancel = null;
        _this.config = {};
        return _this;
      }
      CommonPrompt.prototype.onTouchEnd = function(event, data) {
        switch (event.target.name) {
         case "btn_ok":
          this.onOk();
          break;

         case "btn_cancel":
          this.onCancel();
        }
      };
      CommonPrompt.prototype.onAdded = function(params) {
        void 0 === params && (params = {});
        this.config = params || {};
        this.setTitle();
        this.setContent();
        this.setBtnOkLabel();
        this.setBtnCancelLabel();
        this.node.active = true;
      };
      CommonPrompt.prototype.setTitle = function() {
        this.lab_title.string = this.config.title;
      };
      CommonPrompt.prototype.setContent = function() {
        this.lab_content.string = this.config.content;
      };
      CommonPrompt.prototype.setBtnOkLabel = function() {
        this.lab_ok.string = this.config.okWord;
      };
      CommonPrompt.prototype.setBtnCancelLabel = function() {
        this.lab_cancel.string = this.config.cancelWord;
        this.lab_cancel.node.parent.active = this.config.needCancel || false;
      };
      CommonPrompt.prototype.onOk = function() {
        "function" == typeof this.config.okFunc && this.config.okFunc();
        this.close();
      };
      CommonPrompt.prototype.onClose = function() {
        "function" == typeof this.config.closeFunc && this.config.closeFunc();
        this.close();
      };
      CommonPrompt.prototype.onCancel = function() {
        "function" == typeof this.config.cancelFunc && this.config.cancelFunc();
        this.close();
      };
      CommonPrompt.prototype.close = function() {
        Engine_1.engine.gui.removeByNode(this.node);
      };
      CommonPrompt.prototype.share = function() {
        Engine_1.engine.platform.onShare(function(res) {
          res ? console.log("\u5206\u4eab\u6210\u529f") : console.log("\u5206\u4eab\u5931\u8d25");
        });
      };
      CommonPrompt.prototype.onDestroy = function() {
        this.config = null;
      };
      __decorate([ property(cc.Label) ], CommonPrompt.prototype, "lab_title", void 0);
      __decorate([ property(cc.Label) ], CommonPrompt.prototype, "lab_content", void 0);
      __decorate([ property(cc.Label) ], CommonPrompt.prototype, "lab_ok", void 0);
      __decorate([ property(cc.Label) ], CommonPrompt.prototype, "lab_cancel", void 0);
      CommonPrompt = __decorate([ ccclass ], CommonPrompt);
      return CommonPrompt;
    }(cc.Component);
    exports.default = CommonPrompt;
    cc._RF.pop();
  }, {
    "../../Engine": "Engine"
  } ],
  CommonUtilsNew: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "e37ea4bmEBKtKu/poMmODlf", "CommonUtilsNew");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.CommonUtilsNew = void 0;
    var CocosHelper_1 = require("./CocosHelper");
    var MathUtils_1 = require("./MathUtils");
    var kDefaultRandomGenerator = {
      nextInt: function(start, endAndNotIncluded) {
        return Math.floor(Math.random() * (endAndNotIncluded - start)) + start;
      },
      next01: function() {
        return Math.random();
      }
    };
    var CommonUtilsNew = function() {
      function CommonUtilsNew() {}
      CommonUtilsNew.isArray = function(target) {
        return "function" === typeof Array.isArray ? Array.isArray(target) : "[object Array]" === Object.prototype.toString.call(target);
      };
      CommonUtilsNew.foramtDate = function(dateObj, format) {
        var date = {
          "M+": dateObj.getMonth() + 1,
          "d+": dateObj.getDate(),
          "h+": dateObj.getHours(),
          "m+": dateObj.getMinutes(),
          "s+": dateObj.getSeconds(),
          "q+": Math.floor((dateObj.getMonth() + 3) / 3),
          "S+": dateObj.getMilliseconds()
        };
        /(y+)/i.test(format) && (format = format.replace(RegExp.$1, (dateObj.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var k in date) new RegExp("(" + k + ")").test(format) && (format = format.replace(RegExp.$1, ("00" + date[k]).substr(("" + date[k]).length)));
        return format;
      };
      CommonUtilsNew.getElemClamped = function(arr, index) {
        return arr[Math.max(0, Math.min(arr.length - 1, index))];
      };
      CommonUtilsNew.randomIntClosedRange = function(min, max) {
        return Math.floor(Math.random() * (max - min + .9999) + min);
      };
      CommonUtilsNew.indexOf = function(val, arr) {
        for (var i = 0; i < arr.length; i++) if (arr[i] == val) return i;
        return -1;
      };
      CommonUtilsNew.indexOfArr = function(arr) {
        var values = [];
        for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
        var paramCount = values.length;
        var found = false;
        for (var i = 0; i <= arr.length - paramCount; i += paramCount) {
          found = true;
          for (var j = 0; j < paramCount; j++) if (arr[i + j] !== values[j]) {
            found = false;
            break;
          }
          if (found) return i;
        }
        return -1;
      };
      CommonUtilsNew.floatEqual = function(left, right, epsilon) {
        void 0 === epsilon && (epsilon = 1e-6);
        return Math.abs(left - right) < epsilon;
      };
      CommonUtilsNew.formatTimeInterval = function(seconds, alwaysShowMinutes, alwaysShowHours) {
        void 0 === alwaysShowMinutes && (alwaysShowMinutes = false);
        void 0 === alwaysShowHours && (alwaysShowHours = false);
        alwaysShowMinutes = alwaysShowHours || alwaysShowMinutes;
        var ret = "";
        var hour = Math.floor(seconds / 3600);
        seconds %= 3600;
        var minute = Math.floor(seconds / 60);
        seconds = Math.floor(seconds % 60);
        if (alwaysShowHours || hour > 0) {
          hour < 10 && (ret += "0");
          ret += hour + ":";
        }
        if (alwaysShowMinutes || minute > 0 || hour > 0) {
          minute < 10 && (ret += "0");
          ret += minute + ":";
        }
        seconds < 10 && (ret += "0");
        ret += seconds;
        return ret;
      };
      CommonUtilsNew.alignNumber = function(input, divider) {
        input -= Math.floor(input / divider) * divider;
        return input;
      };
      CommonUtilsNew.formatNumber = function(num) {
        var str = "" + Math.floor(num);
        var newStr = "";
        var count = 0;
        if (-1 == str.indexOf(".")) {
          for (var i = str.length - 1; i >= 0; i--) {
            newStr = count % 3 == 0 && 0 != count ? str.charAt(i) + "," + newStr : str.charAt(i) + newStr;
            count++;
          }
          str = newStr;
          return str;
        }
        for (var i = str.indexOf(".") - 1; i >= 0; i--) {
          newStr = count % 3 == 0 && 0 != count ? str.charAt(i) + "," + newStr : str.charAt(i) + newStr;
          count++;
        }
        str = newStr + (str + "00").substr((str + "00").indexOf("."), 3);
        return str;
      };
      CommonUtilsNew.updateLabelSize = function(label) {
        label["_updateRenderData"](true);
      };
      CommonUtilsNew.lerp = function(begin, end, factor) {
        return begin + (end - begin) * factor;
      };
      CommonUtilsNew.shuffle = function(container, randGenerator, start, count) {
        void 0 === randGenerator && (randGenerator = kDefaultRandomGenerator);
        void 0 === start && (start = 0);
        void 0 === count && (count = -1);
        randGenerator = randGenerator || kDefaultRandomGenerator;
        count < 0 && (count = container.length - start);
        for (var i = 0; i < count; i++) {
          var idx = randGenerator.nextInt(start, start + count - i);
          var temp = container[idx];
          container[idx] = container[count - i - 1 + start];
          container[count - i - 1 + start] = temp;
        }
      };
      CommonUtilsNew.setItemSpriteFrame = function(sprite, url, successCB) {
        void 0 === successCB && (successCB = null);
        sprite["spriteFrameName"] = url;
        CocosHelper_1.default.loadResSync(url, cc.SpriteFrame).then(function(spriteFrame) {
          if (sprite.isValid && sprite["spriteFrameName"] == url) {
            sprite.spriteFrame = spriteFrame;
            successCB && successCB(sprite);
          }
        });
      };
      CommonUtilsNew.addSimpleClick = function(target, cb) {
        var targetNode = target;
        var lastTouchPos = null;
        targetNode.on(cc.Node.EventType.TOUCH_START, function(e) {
          lastTouchPos = e.getLocation();
        }, this);
        targetNode.on(cc.Node.EventType.TOUCH_END, function(e) {
          if (lastTouchPos) {
            var delta = lastTouchPos.subSelf(e.getLocation()).mag();
            delta < 3 && cb();
          }
        }, this);
      };
      CommonUtilsNew.isGoodNumber = function(num) {
        return "number" === typeof num && !Number.isNaN(num);
      };
      CommonUtilsNew.getVisibleRect = function() {
        var visibleRect = cc.view.getViewportRect();
        visibleRect = cc.rect(visibleRect.origin.x / -cc.view.getScaleX(), visibleRect.origin.y / -cc.view.getScaleY(), (visibleRect.size.width + 2 * visibleRect.origin.x) / cc.view.getScaleX(), (visibleRect.size.height + 2 * visibleRect.origin.y) / cc.view.getScaleY());
        return visibleRect;
      };
      CommonUtilsNew.httpGet = function(url, cb) {
        var xhr = cc.loader.getXMLHttpRequest();
        xhr.onreadystatechange = function() {
          if (4 === xhr.readyState && 200 == xhr.status) {
            var respone = xhr.responseText;
            var rsp = JSON.parse(respone);
            cb(rsp);
          } else 4 === xhr.readyState && 401 == xhr.status && cb({
            ret: 1
          });
        };
        xhr.withCredentials = true;
        xhr.open("GET", url, true);
        xhr.withCredentials = false;
        xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
        xhr.setRequestHeader("Access-Control-Allow-Methods", "GET, POST");
        xhr.setRequestHeader("Access-Control-Allow-Headers", "x-requested-with,content-type,authorization");
        xhr.setRequestHeader("Content-Type", "application/json");
        xhr.timeout = 8e3;
        xhr.send();
      };
      CommonUtilsNew.randomGaussian = function(avg, variant, randGenerator) {
        void 0 === randGenerator && (randGenerator = kDefaultRandomGenerator);
        randGenerator = randGenerator || kDefaultRandomGenerator;
        var x1 = randGenerator.next01();
        var x2 = randGenerator.next01();
        var standard = Math.sqrt(-2 * Math.log(x1)) * Math.cos(2 * Math.PI * x2);
        return standard * variant + avg;
      };
      CommonUtilsNew.deepCopy = function(dst, src) {
        for (var field in src) this._deepCopyFields(dst, src, field);
      };
      CommonUtilsNew.constructObjectMap = function(obj) {
        var map = new Map();
        for (var key in obj) {
          var val = obj[key];
          "object" === typeof val ? map.set(key, this.constructObjectMap(val)) : map.set(key, val);
        }
        return map;
      };
      CommonUtilsNew._deepCopyFields = function(dst, src, field) {
        var value = src[field];
        if ("number" == typeof value || "string" == typeof value) dst[field] = value; else if (this.isArray[value]) {
          var dstArr = dst[field] = [];
          for (var i = 0; i < value.length; i++) this._deepCopyFields(dstArr, value, i);
        } else if (null == value) dst[field] = null; else if ("object" == typeof value) {
          var dstObj = new value.constructor();
          for (var field_1 in src) this._deepCopyFields(dstObj, value, field_1);
        }
      };
      CommonUtilsNew.formatNumberToEng = function(value) {
        if (value < 1 && value > 0) return "1";
        value = Math.floor(value);
        var exp = Math.floor(CommonUtilsNew.getExponent(value));
        if (exp < 13) {
          if (exp < 4) return value + "";
          var unitIt = Math.floor(exp / CommonUtilsNew.constNum);
          var rem = exp % CommonUtilsNew.constNum;
          var numStr = String(value / Math.pow(10, unitIt * CommonUtilsNew.constNum)).substr(0, CommonUtilsNew.constNum + rem);
          return numStr + CommonUtilsNew.getUnit(exp);
        }
        var _num = value / Math.pow(10, exp);
        return _num.toFixed(3) + "e" + exp;
      };
      CommonUtilsNew.getExponent = function(value) {
        var exp = 0;
        while (value >= 10) {
          exp++;
          value /= 10;
        }
        return exp;
      };
      CommonUtilsNew.getUnit = function(exp) {
        var unitIt = Math.floor(exp / CommonUtilsNew.constNum);
        if (exp < 13) return CommonUtilsNew.unitArr[unitIt];
        var unitIt = Math.floor(exp / CommonUtilsNew.constNum);
        return "e" + unitIt * CommonUtilsNew.constNum;
      };
      CommonUtilsNew.formatEngNumber = function(number, decimals) {
        void 0 === decimals && (decimals = 2);
        var str;
        var num;
        number = number;
        if (number >= 1e6) {
          num = number / 1e6;
          str = (.001 * Math.floor(num / .001)).toFixed(decimals);
          return this.formatEndingZero(str) + "M";
        }
        if (number >= 1e3) {
          num = number / 1e3;
          str = (.001 * Math.floor(num / .001)).toFixed(decimals);
          return this.formatEndingZero(str) + "K";
        }
        return number + "";
      };
      CommonUtilsNew.formatEndingZero = function(c) {
        if (-1 != c.indexOf(".")) {
          if (this.endWith(c, "00")) return c.substring(0, c.length - 3);
          if (this.endWith(c, "0")) return c.substring(0, c.length - 1);
        }
        return c;
      };
      CommonUtilsNew.endWith = function(c, suffix) {
        return suffix == c.substring(c.length - suffix.length);
      };
      CommonUtilsNew.makeMaxWidthLabel = function(label, width) {
        var obj = {};
        obj["__proto__"] = label;
        Object.defineProperty(obj, "string", {
          configurable: true,
          enumerable: true,
          get: function() {
            return label.string;
          },
          set: function(str) {
            label.overflow = cc.Label.Overflow.NONE;
            label.string = str;
            label["_updateRenderData"](true);
            if (label.node.width > width) {
              label.overflow = cc.Label.Overflow.RESIZE_HEIGHT;
              label.node.setContentSize(width, 1);
              label.string = str;
            }
          }
        });
        return obj;
      };
      CommonUtilsNew.climeUserName = function(name, showLen) {
        void 0 === showLen && (showLen = 14);
        var len = name.length;
        while (this.strlen(name) > showLen) name = name.substring(0, name.length - 1);
        name.length != len && (name += "...");
        return name;
      };
      CommonUtilsNew.strlen = function(str) {
        var len = 0;
        for (var i = 0; i < str.length; i++) {
          var c = str.charCodeAt(i);
          c >= 1 && c <= 126 || 65376 <= c && c <= 65439 ? len++ : len += 2;
        }
        return len;
      };
      CommonUtilsNew.shuffleArr = function(arr) {
        var _swap = function(a, b) {
          var tmp = arr[a];
          arr[a] = arr[b];
          arr[b] = tmp;
        };
        var len = arr.length;
        for (var i = 0; i < len; i++) {
          var idx = Math.floor(Math.random() * (len - i));
          _swap(idx, len - i - 1);
        }
        return arr;
      };
      CommonUtilsNew.binarySearch = function(arr, target, findFlag) {
        void 0 === findFlag && (findFlag = false);
        var start = 0, end = arr.length - 1;
        while (end - start > 1) {
          var idx = Math.floor((start + end) / 2);
          if (target < arr[idx]) end = idx; else {
            if (!(target > arr[idx])) return idx;
            start = idx;
          }
        }
        if (findFlag) {
          if (start == arr.length - 1) return arr.length;
          return end;
        }
        if (0 == end) return -1;
        return start;
      };
      CommonUtilsNew.isInTriangle = function(point, triA, triB, triC) {
        var AB = triB.sub(triA), AC = triC.sub(triA), BC = triC.sub(triB), AD = point.sub(triA), BD = point.sub(triB);
        return AB.cross(AC) >= 0 ^ AB.cross(AD) < 0 && AB.cross(AC) >= 0 ^ AC.cross(AD) >= 0 && BC.cross(AB) > 0 ^ BC.cross(BD) >= 0;
      };
      CommonUtilsNew.isInPolygon = function(checkPoint, polygonPoints) {
        var counter = 0;
        var i;
        var xinters;
        var p1, p2;
        var pointCount = polygonPoints.length;
        p1 = polygonPoints[0];
        for (i = 1; i <= pointCount; i++) {
          p2 = polygonPoints[i % pointCount];
          if (checkPoint.x > Math.min(p1.x, p2.x) && checkPoint.x <= Math.max(p1.x, p2.x) && checkPoint.y <= Math.max(p1.y, p2.y) && p1.x != p2.x) {
            xinters = (checkPoint.x - p1.x) * (p2.y - p1.y) / (p2.x - p1.x) + p1.y;
            (p1.y == p2.y || checkPoint.y <= xinters) && counter++;
          }
          p1 = p2;
        }
        return counter % 2 != 0;
      };
      CommonUtilsNew.splitPolygon = function(points) {
        if (points.length <= 3) return [ 0, 1, 2 ];
        var pointMap = {};
        for (var i = 0; i < points.length; i++) {
          var p = points[i];
          pointMap[p.x + "-" + p.y] = i;
        }
        var getIdx = function(p) {
          return pointMap[p.x + "-" + p.y];
        };
        points = points.concat([]);
        var idxs = [];
        var index = 0;
        while (points.length > 3) {
          var p1 = points[index % points.length], p2 = points[(index + 1) % points.length], p3 = points[(index + 2) % points.length];
          var splitPoint = (index + 1) % points.length;
          var v1 = p2.sub(p1);
          var v2 = p3.sub(p2);
          if (v1.cross(v2) < 0) {
            index = (index + 1) % points.length;
            continue;
          }
          var hasPoint = false;
          for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var p = points_1[_i];
            if (p != p1 && p != p2 && p != p3 && this.isInTriangle(p, p1, p2, p3)) {
              hasPoint = true;
              break;
            }
          }
          if (hasPoint) {
            index = (index + 1) % points.length;
            continue;
          }
          idxs.push(getIdx(p1), getIdx(p2), getIdx(p3));
          points.splice(splitPoint, 1);
        }
        for (var _a = 0, points_2 = points; _a < points_2.length; _a++) {
          var p = points_2[_a];
          idxs.push(getIdx(p));
        }
        return idxs;
      };
      CommonUtilsNew.computeUv = function(points, width, height) {
        var uvs = [];
        for (var _i = 0, points_3 = points; _i < points_3.length; _i++) {
          var p = points_3[_i];
          var x = MathUtils_1.MathUtils.clamp(0, 1, (p.x + width / 2) / width);
          var y = MathUtils_1.MathUtils.clamp(0, 1, 1 - (p.y + height / 2) / height);
          uvs.push(cc.v2(x, y));
        }
        return uvs;
      };
      CommonUtilsNew.splitPolygonByLine = function(a, b, polygon) {
        var lint = {
          type: "LineString",
          coordinates: [ [ a.x, a.y ], [ b.x, b.y ] ]
        };
      };
      CommonUtilsNew.unitArr = [ "", "K", "M", "B" ];
      CommonUtilsNew.constNum = 3;
      return CommonUtilsNew;
    }();
    exports.CommonUtilsNew = CommonUtilsNew;
    cc._RF.pop();
  }, {
    "./CocosHelper": "CocosHelper",
    "./MathUtils": "MathUtils"
  } ],
  CommonUtils: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "21e788eHntDPZ+Hwk/KJCcT", "CommonUtils");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.CommonUtils = void 0;
    var MathUtil_1 = require("../../core/utils/MathUtil");
    var kDefaultRandomGenerator = {
      nextInt: function(start, endAndNotIncluded) {
        return Math.floor(Math.random() * (endAndNotIncluded - start)) + start;
      },
      next01: function() {
        return Math.random();
      }
    };
    var CommonUtils = function() {
      function CommonUtils() {}
      CommonUtils.isArray = function(target) {
        return "function" === typeof Array.isArray ? Array.isArray(target) : "[object Array]" === Object.prototype.toString.call(target);
      };
      CommonUtils.foramtDate = function(dateObj, format) {
        var date = {
          "M+": dateObj.getMonth() + 1,
          "d+": dateObj.getDate(),
          "h+": dateObj.getHours(),
          "m+": dateObj.getMinutes(),
          "s+": dateObj.getSeconds(),
          "q+": Math.floor((dateObj.getMonth() + 3) / 3),
          "S+": dateObj.getMilliseconds()
        };
        /(y+)/i.test(format) && (format = format.replace(RegExp.$1, (dateObj.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var k in date) new RegExp("(" + k + ")").test(format) && (format = format.replace(RegExp.$1, ("00" + date[k]).substr(("" + date[k]).length)));
        return format;
      };
      CommonUtils.getElemClamped = function(arr, index) {
        return arr[Math.max(0, Math.min(arr.length - 1, index))];
      };
      CommonUtils.randomIntClosedRange = function(min, max) {
        return Math.floor(Math.random() * (max - min + .9999) + min);
      };
      CommonUtils.indexOf = function(val, arr) {
        for (var i = 0; i < arr.length; i++) if (arr[i] == val) return i;
        return -1;
      };
      CommonUtils.indexOfArr = function(arr) {
        var values = [];
        for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
        var paramCount = values.length;
        var found = false;
        for (var i = 0; i <= arr.length - paramCount; i += paramCount) {
          found = true;
          for (var j = 0; j < paramCount; j++) if (arr[i + j] !== values[j]) {
            found = false;
            break;
          }
          if (found) return i;
        }
        return -1;
      };
      CommonUtils.floatEqual = function(left, right, epsilon) {
        void 0 === epsilon && (epsilon = 1e-6);
        return Math.abs(left - right) < epsilon;
      };
      CommonUtils.formatTimeInterval = function(seconds, alwaysShowMinutes, alwaysShowHours) {
        void 0 === alwaysShowMinutes && (alwaysShowMinutes = false);
        void 0 === alwaysShowHours && (alwaysShowHours = false);
        alwaysShowMinutes = alwaysShowHours || alwaysShowMinutes;
        var ret = "";
        var hour = Math.floor(seconds / 3600);
        seconds %= 3600;
        var minute = Math.floor(seconds / 60);
        seconds = Math.floor(seconds % 60);
        if (alwaysShowHours || hour > 0) {
          hour < 10 && (ret += "0");
          ret += hour + ":";
        }
        if (alwaysShowMinutes || minute > 0 || hour > 0) {
          minute < 10 && (ret += "0");
          ret += minute + ":";
        }
        seconds < 10 && (ret += "0");
        ret += seconds;
        return ret;
      };
      CommonUtils.alignNumber = function(input, divider) {
        input -= Math.floor(input / divider) * divider;
        return input;
      };
      CommonUtils.formatNumber = function(num) {
        var str = "" + Math.floor(num);
        var newStr = "";
        var count = 0;
        if (-1 == str.indexOf(".")) {
          for (var i = str.length - 1; i >= 0; i--) {
            newStr = count % 3 == 0 && 0 != count ? str.charAt(i) + "," + newStr : str.charAt(i) + newStr;
            count++;
          }
          str = newStr;
          return str;
        }
        for (var i = str.indexOf(".") - 1; i >= 0; i--) {
          newStr = count % 3 == 0 && 0 != count ? str.charAt(i) + "," + newStr : str.charAt(i) + newStr;
          count++;
        }
        str = newStr + (str + "00").substr((str + "00").indexOf("."), 3);
        return str;
      };
      CommonUtils.updateLabelSize = function(label) {
        label["_updateRenderData"](true);
      };
      CommonUtils.lerp = function(begin, end, factor) {
        return begin + (end - begin) * factor;
      };
      CommonUtils.shuffle = function(container, randGenerator, start, count) {
        void 0 === randGenerator && (randGenerator = kDefaultRandomGenerator);
        void 0 === start && (start = 0);
        void 0 === count && (count = -1);
        randGenerator = randGenerator || kDefaultRandomGenerator;
        count < 0 && (count = container.length - start);
        for (var i = 0; i < count; i++) {
          var idx = randGenerator.nextInt(start, start + count - i);
          var temp = container[idx];
          container[idx] = container[count - i - 1 + start];
          container[count - i - 1 + start] = temp;
        }
      };
      CommonUtils.addSimpleClick = function(target, cb) {
        var targetNode = target;
        var lastTouchPos = null;
        targetNode.on(cc.Node.EventType.TOUCH_START, function(e) {
          lastTouchPos = e.getLocation();
        }, this);
        targetNode.on(cc.Node.EventType.TOUCH_END, function(e) {
          if (lastTouchPos) {
            var delta = lastTouchPos.subSelf(e.getLocation()).mag();
            delta < 3 && cb();
          }
        }, this);
      };
      CommonUtils.isGoodNumber = function(num) {
        return "number" === typeof num && !Number.isNaN(num);
      };
      CommonUtils.getVisibleRect = function() {
        var visibleRect = cc.view.getViewportRect();
        visibleRect = cc.rect(visibleRect.origin.x / -cc.view.getScaleX(), visibleRect.origin.y / -cc.view.getScaleY(), (visibleRect.size.width + 2 * visibleRect.origin.x) / cc.view.getScaleX(), (visibleRect.size.height + 2 * visibleRect.origin.y) / cc.view.getScaleY());
        return visibleRect;
      };
      CommonUtils.httpGet = function(url, cb) {
        var xhr = cc.loader.getXMLHttpRequest();
        xhr.onreadystatechange = function() {
          if (4 === xhr.readyState && 200 == xhr.status) {
            var respone = xhr.responseText;
            var rsp = JSON.parse(respone);
            cb(rsp);
          } else 4 === xhr.readyState && 401 == xhr.status && cb({
            ret: 1
          });
        };
        xhr.withCredentials = true;
        xhr.open("GET", url, true);
        xhr.withCredentials = false;
        xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
        xhr.setRequestHeader("Access-Control-Allow-Methods", "GET, POST");
        xhr.setRequestHeader("Access-Control-Allow-Headers", "x-requested-with,content-type,authorization");
        xhr.setRequestHeader("Content-Type", "application/json");
        xhr.timeout = 8e3;
        xhr.send();
      };
      CommonUtils.randomGaussian = function(avg, variant, randGenerator) {
        void 0 === randGenerator && (randGenerator = kDefaultRandomGenerator);
        randGenerator = randGenerator || kDefaultRandomGenerator;
        var x1 = randGenerator.next01();
        var x2 = randGenerator.next01();
        var standard = Math.sqrt(-2 * Math.log(x1)) * Math.cos(2 * Math.PI * x2);
        return standard * variant + avg;
      };
      CommonUtils.deepCopy = function(dst, src) {
        for (var field in src) this._deepCopyFields(dst, src, field);
      };
      CommonUtils.constructObjectMap = function(obj) {
        var map = new Map();
        for (var key in obj) {
          var val = obj[key];
          "object" === typeof val ? map.set(key, this.constructObjectMap(val)) : map.set(key, val);
        }
        return map;
      };
      CommonUtils._deepCopyFields = function(dst, src, field) {
        var value = src[field];
        if ("number" == typeof value || "string" == typeof value) dst[field] = value; else if (this.isArray[value]) {
          var dstArr = dst[field] = [];
          for (var i = 0; i < value.length; i++) this._deepCopyFields(dstArr, value, i);
        } else if (null == value) dst[field] = null; else if ("object" == typeof value) {
          var dstObj = new value.constructor();
          for (var field_1 in src) this._deepCopyFields(dstObj, value, field_1);
        }
      };
      CommonUtils.formatNumberToEng = function(value) {
        if (value < 1 && value > 0) return "1";
        value = Math.floor(value);
        var exp = Math.floor(CommonUtils.getExponent(value));
        if (exp < 13) {
          if (exp < 4) return value + "";
          var unitIt = Math.floor(exp / CommonUtils.constNum);
          var rem = exp % CommonUtils.constNum;
          var numStr = String(value / Math.pow(10, unitIt * CommonUtils.constNum)).substr(0, CommonUtils.constNum + rem);
          return numStr + CommonUtils.getUnit(exp);
        }
        var _num = value / Math.pow(10, exp);
        return _num.toFixed(3) + "e" + exp;
      };
      CommonUtils.getExponent = function(value) {
        var exp = 0;
        while (value >= 10) {
          exp++;
          value /= 10;
        }
        return exp;
      };
      CommonUtils.getUnit = function(exp) {
        var unitIt = Math.floor(exp / CommonUtils.constNum);
        if (exp < 13) return CommonUtils.unitArr[unitIt];
        var unitIt = Math.floor(exp / CommonUtils.constNum);
        return "e" + unitIt * CommonUtils.constNum;
      };
      CommonUtils.formatEngNumber = function(number, decimals) {
        void 0 === decimals && (decimals = 2);
        var str;
        var num;
        number = number;
        if (number >= 1e6) {
          num = number / 1e6;
          str = (.001 * Math.floor(num / .001)).toFixed(decimals);
          return this.formatEndingZero(str) + "M";
        }
        if (number >= 1e3) {
          num = number / 1e3;
          str = (.001 * Math.floor(num / .001)).toFixed(decimals);
          return this.formatEndingZero(str) + "K";
        }
        return number + "";
      };
      CommonUtils.formatEndingZero = function(c) {
        if (-1 != c.indexOf(".")) {
          if (this.endWith(c, "00")) return c.substring(0, c.length - 3);
          if (this.endWith(c, "0")) return c.substring(0, c.length - 1);
        }
        return c;
      };
      CommonUtils.endWith = function(c, suffix) {
        return suffix == c.substring(c.length - suffix.length);
      };
      CommonUtils.makeMaxWidthLabel = function(label, width) {
        var obj = {};
        obj["__proto__"] = label;
        Object.defineProperty(obj, "string", {
          configurable: true,
          enumerable: true,
          get: function() {
            return label.string;
          },
          set: function(str) {
            label.overflow = cc.Label.Overflow.NONE;
            label.string = str;
            label["_updateRenderData"](true);
            if (label.node.width > width) {
              label.overflow = cc.Label.Overflow.RESIZE_HEIGHT;
              label.node.setContentSize(width, 1);
              label.string = str;
            }
          }
        });
        return obj;
      };
      CommonUtils.climeUserName = function(name, showLen) {
        void 0 === showLen && (showLen = 14);
        var len = name.length;
        while (this.strlen(name) > showLen) name = name.substring(0, name.length - 1);
        name.length != len && (name += "...");
        return name;
      };
      CommonUtils.strlen = function(str) {
        var len = 0;
        for (var i = 0; i < str.length; i++) {
          var c = str.charCodeAt(i);
          c >= 1 && c <= 126 || 65376 <= c && c <= 65439 ? len++ : len += 2;
        }
        return len;
      };
      CommonUtils.shuffleArr = function(arr) {
        var _swap = function(a, b) {
          var tmp = arr[a];
          arr[a] = arr[b];
          arr[b] = tmp;
        };
        var len = arr.length;
        for (var i = 0; i < len; i++) {
          var idx = Math.floor(Math.random() * (len - i));
          _swap(idx, len - i - 1);
        }
        return arr;
      };
      CommonUtils.binarySearch = function(arr, target, findFlag) {
        void 0 === findFlag && (findFlag = false);
        var start = 0, end = arr.length - 1;
        while (end - start > 1) {
          var idx = Math.floor((start + end) / 2);
          if (target < arr[idx]) end = idx; else {
            if (!(target > arr[idx])) return idx;
            start = idx;
          }
        }
        if (findFlag) {
          if (start == arr.length - 1) return arr.length;
          return end;
        }
        if (0 == end) return -1;
        return start;
      };
      CommonUtils.isInTriangle = function(point, triA, triB, triC) {
        var AB = triB.sub(triA), AC = triC.sub(triA), BC = triC.sub(triB), AD = point.sub(triA), BD = point.sub(triB);
        return AB.cross(AC) >= 0 ^ AB.cross(AD) < 0 && AB.cross(AC) >= 0 ^ AC.cross(AD) >= 0 && BC.cross(AB) > 0 ^ BC.cross(BD) >= 0;
      };
      CommonUtils.isInPolygon = function(checkPoint, polygonPoints) {
        var counter = 0;
        var i;
        var xinters;
        var p1, p2;
        var pointCount = polygonPoints.length;
        p1 = polygonPoints[0];
        for (i = 1; i <= pointCount; i++) {
          p2 = polygonPoints[i % pointCount];
          if (checkPoint.x > Math.min(p1.x, p2.x) && checkPoint.x <= Math.max(p1.x, p2.x) && checkPoint.y <= Math.max(p1.y, p2.y) && p1.x != p2.x) {
            xinters = (checkPoint.x - p1.x) * (p2.y - p1.y) / (p2.x - p1.x) + p1.y;
            (p1.y == p2.y || checkPoint.y <= xinters) && counter++;
          }
          p1 = p2;
        }
        return counter % 2 != 0;
      };
      CommonUtils.splitPolygon = function(points) {
        if (points.length <= 3) return [ 0, 1, 2 ];
        var pointMap = {};
        for (var i = 0; i < points.length; i++) {
          var p = points[i];
          pointMap[p.x + "-" + p.y] = i;
        }
        var getIdx = function(p) {
          return pointMap[p.x + "-" + p.y];
        };
        points = points.concat([]);
        var idxs = [];
        var index = 0;
        while (points.length > 3) {
          var p1 = points[index % points.length], p2 = points[(index + 1) % points.length], p3 = points[(index + 2) % points.length];
          var splitPoint = (index + 1) % points.length;
          var v1 = p2.sub(p1);
          var v2 = p3.sub(p2);
          if (v1.cross(v2) < 0) {
            index = (index + 1) % points.length;
            continue;
          }
          var hasPoint = false;
          for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var p = points_1[_i];
            if (p != p1 && p != p2 && p != p3 && this.isInTriangle(p, p1, p2, p3)) {
              hasPoint = true;
              break;
            }
          }
          if (hasPoint) {
            index = (index + 1) % points.length;
            continue;
          }
          idxs.push(getIdx(p1), getIdx(p2), getIdx(p3));
          points.splice(splitPoint, 1);
        }
        for (var _a = 0, points_2 = points; _a < points_2.length; _a++) {
          var p = points_2[_a];
          idxs.push(getIdx(p));
        }
        return idxs;
      };
      CommonUtils.computeUv = function(points, width, height) {
        var uvs = [];
        for (var _i = 0, points_3 = points; _i < points_3.length; _i++) {
          var p = points_3[_i];
          var x = MathUtil_1.MathUtils.clamp(0, 1, (p.x + width / 2) / width);
          var y = MathUtil_1.MathUtils.clamp(0, 1, 1 - (p.y + height / 2) / height);
          uvs.push(cc.v2(x, y));
        }
        return uvs;
      };
      CommonUtils.splitPolygonByLine = function(a, b, polygon) {
        var lint = {
          type: "LineString",
          coordinates: [ [ a.x, a.y ], [ b.x, b.y ] ]
        };
      };
      CommonUtils.unitArr = [ "", "K", "M", "B" ];
      CommonUtils.constNum = 3;
      return CommonUtils;
    }();
    exports.CommonUtils = CommonUtils;
    cc._RF.pop();
  }, {
    "../../core/utils/MathUtil": "MathUtil"
  } ],
  Config: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ad640X+dlJF07LQQ9mEZVM2", "Config");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.config = exports.Config = void 0;
    var ResLoader_1 = require("../../../core/common/loader/ResLoader");
    var Engine_1 = require("../../../core/Engine");
    var BuildTimeConstants_1 = require("./BuildTimeConstants");
    var GameConfig_1 = require("./GameConfig");
    var GameQueryConfig_1 = require("./GameQueryConfig");
    var RedPointConfig_1 = require("./RedPointConfig");
    var UIConfig_1 = require("./UIConfig");
    var Config = function() {
      function Config() {}
      Config.prototype.init = function(callback) {
        var _this = this;
        var config = "config";
        var config_name = "config/config";
        ResLoader_1.resLoader.loadDir(config, function() {
          var config = ResLoader_1.resLoader.get(config_name);
          _this.btc = new BuildTimeConstants_1.BuildTimeConstants();
          _this.query = new GameQueryConfig_1.GameQueryConfig();
          _this.game = new GameConfig_1.GameConfig(config);
          Engine_1.engine.gui.init(UIConfig_1.UIConfigData);
          Engine_1.engine.redPointSystem.init(RedPointConfig_1.RedConfigData);
          console.log("http\u63a5\u53e3\u914d\u7f6e\u6587\u4ef6\u521d\u59cb\u5316\u5b8c\u6bd5");
          callback();
        });
      };
      return Config;
    }();
    exports.Config = Config;
    exports.config = new Config();
    cc._RF.pop();
  }, {
    "../../../core/Engine": "Engine",
    "../../../core/common/loader/ResLoader": "ResLoader",
    "./BuildTimeConstants": "BuildTimeConstants",
    "./GameConfig": "GameConfig",
    "./GameQueryConfig": "GameQueryConfig",
    "./RedPointConfig": "RedPointConfig",
    "./UIConfig": "UIConfig"
  } ],
  Defines: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2e42db6SNNKALpRjkuSBJWw", "Defines");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ViewParams = void 0;
    var ViewParams = function() {
      function ViewParams() {
        this.valid = true;
        this.node = null;
      }
      return ViewParams;
    }();
    exports.ViewParams = ViewParams;
    cc._RF.pop();
  }, {} ],
  DelegateComponent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c458brzZW1GrZ0L946LHhEh", "DelegateComponent");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.DelegateComponent = void 0;
    var ccclass = cc._decorator.ccclass;
    var DelegateComponent = function(_super) {
      __extends(DelegateComponent, _super);
      function DelegateComponent() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.viewParams = null;
        return _this;
      }
      DelegateComponent.prototype.add = function() {
        var viewParams = this.viewParams;
        this.applyComponentsFunction(this.node, "onAdded", viewParams.params);
        "function" === typeof viewParams.callbacks.onAdded && viewParams.callbacks.onAdded(this.node, viewParams.params);
      };
      DelegateComponent.prototype.remove = function(isDestroy) {
        var _this = this;
        var viewParams = this.viewParams;
        if (viewParams.valid) {
          this.applyComponentsFunction(this.node, "onBeforeRemove", viewParams.params);
          "function" === typeof viewParams.callbacks.onBeforeRemove ? viewParams.callbacks.onBeforeRemove(this.node, function() {
            _this.removed(viewParams, isDestroy);
          }) : this.removed(viewParams, isDestroy);
        }
      };
      DelegateComponent.prototype.removed = function(viewParams, isDestroy) {
        viewParams.valid = false;
        "function" === typeof viewParams.callbacks.onRemoved && viewParams.callbacks.onRemoved(this.node, viewParams.params);
        isDestroy ? this.node.destroy() : this.node.removeFromParent();
      };
      DelegateComponent.prototype.onDestroy = function() {
        var viewParams = this.viewParams;
        this.applyComponentsFunction(this.node, "onRemoved", viewParams.params);
        "function" === typeof viewParams.callbacks.onRemoved && viewParams.callbacks.onRemoved(this.node, viewParams.params);
        this.viewParams = null;
      };
      DelegateComponent.prototype.applyComponentsFunction = function(node, funName, params) {
        var components = node.getComponents(cc.Component);
        for (var i = 0; i < components.length; i++) {
          var component = components[i];
          var func = component[funName];
          func && func.call(component, params);
        }
      };
      DelegateComponent = __decorate([ ccclass ], DelegateComponent);
      return DelegateComponent;
    }(cc.Component);
    exports.DelegateComponent = DelegateComponent;
    cc._RF.pop();
  }, {} ],
  EffectManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "be54a/12OFBMpu3QdRGPCS2", "EffectManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PoolManager_1 = require("./PoolManager");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var EffectManager = function() {
      function EffectManager() {}
      EffectManager.prototype.play = function(effect, options, parentNode) {
        var effNode = PoolManager_1.default.instance.getNode("" + effect, parentNode);
        options.pos && effNode.setPosition(options.pos);
        if (effNode.getComponent(cc.Animation)) {
          var anim = effNode.getComponent(cc.Animation);
          anim.on("finished", function() {
            effNode.removeFromParent();
          });
          anim.play();
        } else effNode.getComponent(cc.ParticleSystem) && effNode.getComponent(cc.ParticleSystem).resetSystem();
      };
      EffectManager.prototype.shake = function(targetNode, duration, cb, once) {
        void 0 === once && (once = true);
        var onceNodeShake = function(targetNode, duration, cb, once) {
          var nodeStartPos = targetNode.getPosition();
          var onceDuration = .02;
          var maxNum = 10;
          var minNum = -10;
          cc.Tween.stopAllByTarget(targetNode);
          var randomX = [];
          var randomY = [];
          for (var i = 0; i < 8; i++) {
            var random1 = Math.round(Math.random() * (minNum - maxNum)) + maxNum;
            randomX.push(random1 + nodeStartPos.x);
            var random2 = Math.round(Math.random() * (minNum - maxNum)) + maxNum;
            randomY.push(random2 + nodeStartPos.y);
          }
          cc.tween(targetNode).sequence(cc.tween().to(onceDuration, {
            position: cc.v3(randomX[0], randomY[0], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[1], randomY[1], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[2], randomY[2], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[3], randomY[3], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[4], randomY[4], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[5], randomY[5], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[6], randomY[6], 0)
          }), cc.tween().to(onceDuration, {
            position: cc.v3(randomX[7], randomY[7], 0)
          })).repeatForever().start();
          return new Promise(function(resolve, reject) {
            setTimeout(function() {
              cc.Tween.stopAllByTarget(targetNode);
              targetNode.setPosition(nodeStartPos.x, nodeStartPos.y);
              once ? resolve() : cb && cb();
            }, 1e3 * duration);
          });
        };
        if (targetNode instanceof Array) if (once) {
          var tweens = [];
          for (var i = 0; i < targetNode.length; i++) {
            var tween = onceNodeShake(targetNode[i], duration, cb, once);
            tweens.push(tween);
          }
          Promise.all(tweens).then(function() {
            return cb && cb();
          });
        } else targetNode.forEach(function(node) {
          return onceNodeShake(node, duration, cb, once);
        }); else onceNodeShake(targetNode, duration, cb, once);
      };
      EffectManager = __decorate([ ccclass ], EffectManager);
      return EffectManager;
    }();
    exports.default = EffectManager;
    cc._RF.pop();
  }, {
    "./PoolManager": "PoolManager"
  } ],
  EngineMessage: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4a70b7BfgBDIJZtD0J4kKK7", "EngineMessage");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.EngineMessage = void 0;
    var EngineMessage;
    (function(EngineMessage) {
      EngineMessage["GAME_ENTER"] = "EngineMessage.GAME_ENTER";
      EngineMessage["GAME_EXIT"] = "EngineMessage.GAME_EXIT";
      EngineMessage["GAME_RESIZE"] = "EngineMessage.GAME_RESIZE";
    })(EngineMessage = exports.EngineMessage || (exports.EngineMessage = {}));
    cc._RF.pop();
  }, {} ],
  Engine: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "26c892RHptKhpg39Y7qRbjh", "Engine");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.engine = void 0;
    var AudioManager_1 = require("./common/audio/AudioManager");
    var TimerManager_1 = require("./common/manager/TimerManager");
    var sceneManager_1 = require("./common/scene/sceneManager");
    var storage_1 = require("./common/storage/storage");
    var LayerManager_1 = require("./gui/layer/LayerManager");
    var RedPtTree_1 = require("./libs/redPoint/RedPtTree");
    var Root_1 = require("./Root");
    var PlatformManager_1 = require("./platformInterface/PlatformManager");
    var engine = function() {
      function engine() {}
      engine.isEditor = function() {
        if (this.ispack) return false;
        return !cc.sys.isMobile;
      };
      engine.isWechat = function() {
        return this.CC_Platform == this.gamePlatform.wechat;
      };
      engine.isTiktok = function() {
        return this.CC_Platform == this.gamePlatform.tiktok;
      };
      engine.isKs = function() {
        return this.CC_Platform == this.gamePlatform.ks;
      };
      engine.isOppo = function() {
        return this.CC_Platform == this.gamePlatform.OPPO;
      };
      engine.isVivo = function() {
        return this.CC_Platform == this.gamePlatform.VIVO;
      };
      engine.getRootNode = function(game1, gui, otherNode) {
        if (this.RootNode) {
          var com = this.RootNode.getComponent(Root_1.Root);
          com.game = game1;
          com.gui = gui;
          com.OtherNode = otherNode;
          com.c_gui.node = com.gui;
          com.c_gui.resize();
          return this.RootNode;
        }
        this.RootNode = new cc.Node("RootNode");
        var root = this.RootNode.addComponent(Root_1.Root);
        root.game = game1;
        root.gui = gui;
        root.OtherNode = otherNode;
        game1.parent = this.RootNode;
        gui.parent = this.RootNode;
        cc.game.addPersistRootNode(this.RootNode);
        return this.RootNode;
      };
      engine.init = function(root) {
        engine.storage = storage_1.storage;
        engine.timer = new TimerManager_1.TimerManager(root);
        engine.audio = AudioManager_1.AudioManager.instance;
        engine.scene = sceneManager_1.SceneManager.instance;
        engine.gui = new LayerManager_1.LayerManager(root.gui);
        this.redPointSystem = new RedPtTree_1.RedPtTree();
        engine.platform = PlatformManager_1.default.instance;
        console.log("\u6846\u67b6\u5c42\u521d\u59cb\u5316\u5b8c\u6bd5");
        console.log("\u5f53\u524d\u5e73\u53f0\u662f \uff1a " + this.CC_Platform);
      };
      engine.initLayerManager = function(node) {
        console.log("\u8fdb\u5165initLayerManager");
        engine.gui.initNode(node);
      };
      engine.CC_Platform = 9;
      engine.gameId = 7;
      engine.gamePlatform = {
        primordial: 0,
        H5: 1,
        wechat: 2,
        tiktok: 3,
        baidu: 4,
        QQ: 5,
        ks: 8,
        OPPO: 9,
        VIVO: 10
      };
      engine.ispack = false;
      engine.changeNodeSize = function(node) {
        var size = cc.view.getVisibleSize();
        var scalex = size.width / 750;
        node.setScale(scalex, scalex, 1);
      };
      return engine;
    }();
    exports.engine = engine;
    cc._RF.pop();
  }, {
    "./Root": "Root",
    "./common/audio/AudioManager": "AudioManager",
    "./common/manager/TimerManager": "TimerManager",
    "./common/scene/sceneManager": "sceneManager",
    "./common/storage/storage": "storage",
    "./gui/layer/LayerManager": "LayerManager",
    "./libs/redPoint/RedPtTree": "RedPtTree",
    "./platformInterface/PlatformManager": "PlatformManager"
  } ],
  EventDispatcher: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "48c72YovTRGv78fhLDGWgJm", "EventDispatcher");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.EventDispatcher = void 0;
    var MessageManager_1 = require("./MessageManager");
    var EventDispatcher = function() {
      function EventDispatcher() {
        this._msg = null;
      }
      EventDispatcher.prototype.on = function(event, listener, thisObj) {
        null == this._msg && (this._msg = new MessageManager_1.MessageEventData());
        this._msg.on(event, listener, thisObj);
      };
      EventDispatcher.prototype.off = function(event) {
        this._msg && this._msg.off(event);
      };
      EventDispatcher.prototype.dispatchEvent = function(event, arg) {
        void 0 === arg && (arg = null);
        null == this._msg && (this._msg = new MessageManager_1.MessageEventData());
        this._msg.dispatchEvent(event, arg);
      };
      EventDispatcher.prototype.destroy = function() {
        this._msg && this._msg.removes();
        this._msg = null;
      };
      return EventDispatcher;
    }();
    exports.EventDispatcher = EventDispatcher;
    cc._RF.pop();
  }, {
    "./MessageManager": "MessageManager"
  } ],
  FMJava: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "256a4lmI5NIhJoTzhItemFe", "FMJava");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var FMJava = function() {
      function FMJava() {}
      FMJava.showRewardedVideoAd = function(onClose, onFailed) {
        var _this = this;
        if (this.IsLookVideo) return;
        this.IsLookVideo = true;
        setTimeout(function() {
          _this.IsLookVideo = false;
        }, 3e3);
        this.onClose = onClose;
        this.onFailed = onFailed;
        console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891");
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "showRewardedVideoAd", "()V");
      };
      FMJava.show_FullScreenVideo = function(onClose, onFailed) {
        this.onClose = onClose;
        this.onFailed = onFailed;
        console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891");
        jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "show_FullScreenVideo", "()V");
      };
      FMJava.listener_Video_finish = function(name) {
        console.log(" \u56de\u8c03  \u6fc0\u52b1\u89c6\u9891\u64ad\u653e\u6210\u529f");
        this.onClose && this.onClose(true);
      };
      FMJava.listener_Video_Error = function(name) {
        console.log(" \u56de\u8c03  \u6fc0\u52b1\u89c6\u9891\u64ad\u653e\u9519\u8bef");
        this.onFailed && this.onFailed();
      };
      FMJava.listener_Video_Close = function(name) {
        console.log(" \u56de\u8c03  \u89c6\u9891\u64ad\u653e\u5173\u95ed");
        this.onClose && this.onClose(false);
      };
      FMJava.onClose = null;
      FMJava.onFailed = null;
      FMJava.InterstitialAdNowTime = 0;
      FMJava.InterstitialAdstopTime = 0;
      FMJava.IsLookVideo = false;
      return FMJava;
    }();
    exports.default = FMJava;
    window.FMJava = FMJava;
    cc._RF.pop();
  }, {} ],
  GKManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "67b5bh+C0dCo51KiE0f3p95", "GKManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../core/Engine");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var GKManager = function() {
      function GKManager() {
        this.tnfb_gqCount = 0;
        this.tnfb_gqCurrent = 0;
        this.tnfb_gqMax = 0;
      }
      GKManager.prototype.initData = function() {
        this.tnfb_gqCount = 1;
      };
      GKManager.prototype.setMaxValue = function() {
        this.tnfb_gqMax = 60;
      };
      Object.defineProperty(GKManager.prototype, "Tnfb_gqCurrentGetFun", {
        get: function() {
          return this.tnfb_gqCurrent;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GKManager.prototype, "Tnfb_gqCurrentSetFun", {
        set: function(index) {
          this.tnfb_gqCurrent = index;
        },
        enumerable: false,
        configurable: true
      });
      GKManager.prototype.AddgqCount = function(currentGq, num) {
        num + this.tnfb_gqCount > this.tnfb_gqMax ? this.tnfb_gqCount = this.tnfb_gqMax : currentGq >= this.tnfb_gqCount && (this.tnfb_gqCount = currentGq + 1);
        this.saveLocalData();
      };
      GKManager.prototype.returnData = function() {
        var data = {
          gqCount: this.tnfb_gqCount
        };
        return data;
      };
      GKManager.prototype.saveLocalData = function() {
        var data = this.returnData();
        Engine_1.engine.storage.setItem("gkData", data);
      };
      GKManager.prototype.setData = function(data, Net) {
        data && (void 0 != data.gqCount ? this.tnfb_gqCount = data.gqCount : this.tnfb_gqCount = 1);
      };
      GKManager = __decorate([ ccclass ], GKManager);
      return GKManager;
    }();
    exports.default = GKManager;
    cc._RF.pop();
  }, {
    "../../core/Engine": "Engine"
  } ],
  GUI: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "72c68gMrR1LZbz7N6UH73YH", "GUI");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GUI = void 0;
    var _a = cc._decorator, ccclass = _a.ccclass, menu = _a.menu;
    var GUI = function(_super) {
      __extends(GUI, _super);
      function GUI() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      GUI.prototype.onLoad = function() {
        this.init();
      };
      GUI.prototype.init = function() {
        var windowSize3 = cc.view.getDesignResolutionSize();
        var windowSize5 = cc.view.getFrameSize();
        var windowSize10 = cc.view.getVisibleSizeInPixel();
        this.transform = this.node;
        this.camera = this.getComponentInChildren(cc.Camera);
        this.resize();
      };
      GUI.prototype.resize = function() {
        null == this.transform && null == this.node ? this.destroy() : null == this.transform && null != this.node && (this.transform = this.node);
        var dr = cc.view.getDesignResolutionSize();
        var s = cc.view.getFrameSize();
        var rw = s.width;
        var rh = s.height;
        var finalW = rw;
        var finalH = rh;
        if (rw / rh > dr.width / dr.height) {
          finalH = dr.height;
          finalW = finalH * rw / rh;
          this.portrait = false;
        } else {
          finalW = dr.width;
          finalH = finalW * rh / rw;
          this.portrait = true;
        }
        console.log("\u6700\u7ec8\u5927\u5c0f:w:" + finalW + ",h:" + finalH);
        cc.view.setDesignResolutionSize(finalW, finalH, cc.ResolutionPolicy.UNKNOWN);
        this.transform.width = finalW;
        this.transform.height = finalH;
        console.log(dr, "\u8bbe\u8ba1\u5c3a\u5bf8");
        console.log(s, "\u5c4f\u5e55\u5c3a\u5bf8");
        console.log("w:" + this.transform.width + ",h:" + this.transform.height, "\u6700\u7ec8\u5c3a\u5bf8");
      };
      GUI = __decorate([ ccclass ], GUI);
      return GUI;
    }(cc.Component);
    exports.GUI = GUI;
    cc._RF.pop();
  }, {} ],
  GameAudioConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6a2ccscAPVE0ITo+A2acZJe", "GameAudioConfig");
    "use strict";
    var _a;
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.AudioConfigData = exports.AuidoID = void 0;
    var AuidoID;
    (function(AuidoID) {
      AuidoID[AuidoID["Bg"] = 1] = "Bg";
    })(AuidoID = exports.AuidoID || (exports.AuidoID = {}));
    exports.AudioConfigData = (_a = {}, _a[AuidoID.Bg] = {
      bundle: "common",
      path: "music/bg"
    }, _a);
    cc._RF.pop();
  }, {} ],
  GameComponent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "56137Ro4DhEepMEvM3KmJhI", "GameComponent");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GameComponent = void 0;
    var EventDispatcher_1 = require("../event/EventDispatcher");
    var ccclass = cc._decorator.ccclass;
    var GameComponent = function(_super) {
      __extends(GameComponent, _super);
      function GameComponent() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._eventDispatcher = null;
        _this._isBindMessageActive = false;
        return _this;
      }
      Object.defineProperty(GameComponent.prototype, "eventDispatcher", {
        get: function() {
          this._eventDispatcher || (this._eventDispatcher = new EventDispatcher_1.EventDispatcher());
          return this._eventDispatcher;
        },
        enumerable: false,
        configurable: true
      });
      GameComponent.prototype.bindMessageActive = function() {
        this._isBindMessageActive = true;
      };
      GameComponent.prototype.unbindMessageActive = function() {
        this._isBindMessageActive = false;
      };
      GameComponent.prototype.on = function(event, listener, thisObj) {
        var _this = this;
        this.eventDispatcher.on(event, function(event, args) {
          if (!_this.isValid) {
            if (_this._eventDispatcher) {
              _this._eventDispatcher.destroy();
              _this._eventDispatcher = null;
            }
            return;
          }
          _this._isBindMessageActive ? _this.node.active && listener.call(thisObj, event, args) : listener.call(thisObj, event, args);
        }, thisObj);
      };
      GameComponent.prototype.off = function(event) {
        this._eventDispatcher && this._eventDispatcher.off(event);
      };
      GameComponent.prototype.dispatchEvent = function(event, arg) {
        void 0 === arg && (arg = null);
        this.eventDispatcher.dispatchEvent(event, arg);
      };
      GameComponent.prototype.onDestroy = function() {
        if (this._eventDispatcher) {
          this._eventDispatcher.destroy();
          this._eventDispatcher = null;
        }
      };
      GameComponent = __decorate([ ccclass ], GameComponent);
      return GameComponent;
    }(cc.Component);
    exports.GameComponent = GameComponent;
    cc._RF.pop();
  }, {
    "../event/EventDispatcher": "EventDispatcher"
  } ],
  GameConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "fe4a5bmnQ1EEoItvUzV1ZMr", "GameConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GameConfig = void 0;
    var Logger_1 = require("../../../core/common/log/Logger");
    var GameConfig = function() {
      function GameConfig(config) {
        this._data = null;
        var data = config.json;
        this._data = Object.freeze(data);
        Logger_1.Logger.logConfig(this._data, "\u6e38\u620f\u914d\u7f6e");
      }
      GameConfig.prototype.getConfigPath = function(relative_path) {
        return relative_path;
      };
      GameConfig.prototype.getRolePath = function(name) {
        return "content/role/" + name;
      };
      Object.defineProperty(GameConfig.prototype, "version", {
        get: function() {
          return this._data["config"]["version"];
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GameConfig.prototype, "package", {
        get: function() {
          return this._data["config"]["package"];
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GameConfig.prototype, "frameRate", {
        get: function() {
          return this._data.config.frameRate;
        },
        enumerable: false,
        configurable: true
      });
      return GameConfig;
    }();
    exports.GameConfig = GameConfig;
    cc._RF.pop();
  }, {
    "../../../core/common/log/Logger": "Logger"
  } ],
  GameEvent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "03aa5SZlwtFYYayy5zj8fsc", "GameEvent");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GameEvent = void 0;
    var GameEvent;
    (function(GameEvent) {
      GameEvent["LoginSuccess"] = "LoginSuccess";
      GameEvent["RequsetDataSuccess"] = "GameServerConnected";
      GameEvent["RequsetDataComplete"] = "RequsetDataComplete";
      GameEvent["AudioControll"] = "AudioControll";
      GameEvent["GetCheckpoints"] = "GetCheckpoints";
      GameEvent["IcreaseCheckpointsNum"] = "IncreaseCheckpointsNum";
      GameEvent["GetSpirit"] = "GetSpirit";
      GameEvent["AddSpirit"] = "AddSpirit";
      GameEvent["ReduceSpirit"] = "ReduceSpirit";
    })(GameEvent = exports.GameEvent || (exports.GameEvent = {}));
    cc._RF.pop();
  }, {} ],
  GameQueryConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "047b18DDC5KK62hFnLCaPPU", "GameQueryConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.GameQueryConfig = void 0;
    var Logger_1 = require("../../../core/common/log/Logger");
    var UrlParse_1 = require("./UrlParse");
    var GameQueryConfig = function() {
      function GameQueryConfig() {
        this._data = null;
        var data = new UrlParse_1.UrlParse().query;
        if (!data) return;
        data["username"] || (data["username"] = getWeakUUID());
        this._data = Object.freeze(data);
        Logger_1.Logger.logConfig(this._data, "\u67e5\u8be2\u53c2\u6570");
      }
      Object.defineProperty(GameQueryConfig.prototype, "username", {
        get: function() {
          return this._data["username"];
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GameQueryConfig.prototype, "ip", {
        get: function() {
          return this._data["ip"] || "";
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GameQueryConfig.prototype, "port", {
        get: function() {
          return this._data["port"];
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(GameQueryConfig.prototype, "debug", {
        get: function() {
          return this._data["debug"];
        },
        enumerable: false,
        configurable: true
      });
      GameQueryConfig.prototype.getConfigServerInfo = function() {
        var ret = {
          ips: [],
          ssl: false,
          port: 0
        };
        this.port && (ret.port = parseInt(this.port));
        ret.ips.length < 1 && cc.warn("\u8bf7\u5728\u5730\u5740\u680f\u8f93\u5165\u6e38\u620f\u670d\u52a1\u5668ip");
        ret.port < 1 && cc.warn("\u8bf7\u5728\u5730\u5740\u680f\u8f93\u5165\u7aef\u53e3\u53f7");
        return ret;
      };
      Object.defineProperty(GameQueryConfig.prototype, "data", {
        get: function() {
          return this._data;
        },
        enumerable: false,
        configurable: true
      });
      return GameQueryConfig;
    }();
    exports.GameQueryConfig = GameQueryConfig;
    var getWeakUUID = function() {
      function uuidGenerator(len, radix) {
        var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
        var uuid = [], i;
        radix = radix || chars.length;
        if (len) for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix]; else {
          var r = void 0;
          uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
          uuid[14] = "4";
          for (i = 0; i < 36; i++) if (!uuid[i]) {
            r = 0 | 16 * Math.random();
            uuid[i] = chars[19 == i ? 3 & r | 8 : r];
          }
        }
        return uuid.join("");
      }
      var uuid = cc.sys.localStorage.getItem("__uuid_");
      if (!uuid) {
        uuid = cc.sys.os + cc.sys.platform + "_" + uuidGenerator(13, 16);
        uuid = uuid.replace(/[\s]+/, "");
        cc.sys.localStorage.setItem("__uuid_", uuid);
      }
      return uuid;
    };
    cc._RF.pop();
  }, {
    "../../../core/common/log/Logger": "Logger",
    "./UrlParse": "UrlParse"
  } ],
  GameUIConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3cd80G8DyZBl63HLoeYEE59", "GameUIConfig");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.UIID = void 0;
    var UIID;
    (function(UIID) {
      UIID[UIID["Loding"] = 0] = "Loding";
      UIID[UIID["Login"] = 1] = "Login";
      UIID[UIID["Loading"] = 2] = "Loading";
      UIID[UIID["StartPanel"] = 3] = "StartPanel";
      UIID[UIID["ZshcGamePanel"] = 4] = "ZshcGamePanel";
      UIID[UIID["Game5"] = 5] = "Game5";
      UIID[UIID["Game6"] = 6] = "Game6";
      UIID[UIID["Game7"] = 7] = "Game7";
      UIID[UIID["Game8"] = 8] = "Game8";
      UIID[UIID["Game9"] = 9] = "Game9";
    })(UIID = exports.UIID || (exports.UIID = {}));
    cc._RF.pop();
  }, {} ],
  GeneratorUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c5301xfIeVBsr5A/3fbNnjF", "GeneratorUtil");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var ObjFrameIns = function(_super) {
      __extends(ObjFrameIns, _super);
      function ObjFrameIns() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      ObjFrameIns.prototype._getItemGenerator = function(length, callback) {
        var i;
        return __generator(this, function(_a) {
          switch (_a.label) {
           case 0:
            i = 0;
            _a.label = 1;

           case 1:
            if (!(i < length)) return [ 3, 4 ];
            return [ 4, callback(i) ];

           case 2:
            _a.sent();
            _a.label = 3;

           case 3:
            i++;
            return [ 3, 1 ];

           case 4:
            return [ 2 ];
          }
        });
      };
      ObjFrameIns.prototype.framingLoad = function(length, callback) {
        return __awaiter(this, void 0, void 0, function() {
          return __generator(this, function(_a) {
            switch (_a.label) {
             case 0:
              return [ 4, this.executePreFrame(this._getItemGenerator(length, callback), 10) ];

             case 1:
              _a.sent();
              return [ 2 ];
            }
          });
        });
      };
      ObjFrameIns.prototype.executePreFrame = function(generator, duration) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var gen = generator;
          var execute = function() {
            var startTime = new Date().getTime();
            for (var iter = gen.next(); ;iter = gen.next()) {
              if (null == iter || iter.done) {
                resolve();
                return;
              }
              if (new Date().getTime() - startTime > duration) {
                _this.scheduleOnce(function() {
                  execute();
                });
                return;
              }
            }
          };
          execute();
        });
      };
      ObjFrameIns = __decorate([ ccclass ], ObjFrameIns);
      return ObjFrameIns;
    }(cc.Component);
    exports.default = ObjFrameIns;
    cc._RF.pop();
  }, {} ],
  GraphicsSpriteMesh: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f140dsLEUFJtbbDO9DNPaf7", "GraphicsSpriteMesh");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent;
    var GraphicsSpriteMesh = function(_super) {
      __extends(GraphicsSpriteMesh, _super);
      function GraphicsSpriteMesh() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.sprite = null;
        _this.graphics = null;
        _this._vertices = {
          x: [],
          y: [],
          nu: [],
          nv: [],
          triangles: []
        };
        return _this;
      }
      GraphicsSpriteMesh.prototype.onLoad = function() {
        this.initGraphics();
      };
      GraphicsSpriteMesh.prototype.changeSpriteFrame = function(spriteFrame) {
        this.sprite.spriteFrame = spriteFrame;
        this.initGraphics();
      };
      GraphicsSpriteMesh.prototype.initGraphics = function() {
        this.graphics = this.node.getComponent(cc.Graphics);
        this.sprite.type = cc.Sprite.Type.MESH;
        this.sprite.node.anchorY = 1;
        this.sprite.node.anchorX = 0;
        this.sprite.node.scaleY = -1;
        this.sprite.node.x = 0;
        this.sprite.spriteFrame["vertices"] = this._vertices;
      };
      GraphicsSpriteMesh.prototype.stroke = function() {
        if (cc.game.renderType === cc.game.RENDER_TYPE_WEBGL) {
          var vertices = this._vertices;
          vertices.x.length = vertices.y.length = vertices.nu.length = vertices.nv.length = vertices.triangles.length = 0;
          var _impl = this.graphics["_impl"];
          var w = this.graphics.lineWidth;
          for (var index = 0; index < _impl._paths.length; index++) {
            var path = _impl._paths[index];
            var pathPoints = path.points;
            if (pathPoints.length < 2) continue;
            for (var index2 = 1; index2 < pathPoints.length; index2++) {
              var p = cc.v2(pathPoints[index2].x, pathPoints[index2].y);
              var p_pre = cc.v2(pathPoints[index2 - 1].x, pathPoints[index2 - 1].y);
              var dir = p.sub(p_pre);
              var cross_dir = (0 == dir.y ? cc.v2(0, 1) : cc.v2(1, -dir.x / dir.y).normalize()).mulSelf(w / 2);
              var p_r_t = p.add(cross_dir);
              var p_r_b = p.sub(cross_dir);
              var p_l_t = p_pre.add(cross_dir);
              var p_l_b = p_pre.sub(cross_dir);
              var uv_mul = 50;
              var i_offset = vertices.x.length;
              vertices.x.push(p_r_t.x, p_r_b.x, p_l_t.x, p_l_b.x);
              vertices.y.push(p_r_t.y, p_r_b.y, p_l_t.y, p_l_b.y);
              vertices.nu.push(p_r_t.x / uv_mul, p_r_b.x / uv_mul, p_l_t.x / uv_mul, p_l_b.x / uv_mul);
              vertices.nv.push(p_r_t.y / uv_mul, p_r_b.y / uv_mul, p_l_t.y / uv_mul, p_l_b.y / uv_mul);
              vertices.triangles.push(i_offset + 0);
              vertices.triangles.push(i_offset + 1);
              vertices.triangles.push(i_offset + 2);
              vertices.triangles.push(i_offset + 1);
              vertices.triangles.push(i_offset + 2);
              vertices.triangles.push(i_offset + 3);
              var count = 12;
              i_offset = vertices.x.length;
              vertices.x.push(p.x);
              vertices.y.push(p.y);
              vertices.nu.push(p.x / uv_mul);
              vertices.nv.push(p.y / uv_mul);
              for (var index3 = 0; index3 < count; index3++) {
                var r = 2 * Math.PI * index3 / count;
                var pos_circle = cc.v2(w / 2 * Math.cos(r), w / 2 * Math.sin(r)).addSelf(p);
                vertices.x.push(pos_circle.x);
                vertices.y.push(pos_circle.y);
                vertices.nu.push(pos_circle.x / uv_mul);
                vertices.nv.push(pos_circle.y / uv_mul);
                0 === index3 ? vertices.triangles.push(i_offset, i_offset + 1 + index3, i_offset + count) : vertices.triangles.push(i_offset, i_offset + 1 + index3, i_offset + index3);
              }
            }
          }
          this.sprite["setVertsDirty"]();
        } else this.graphics.stroke();
      };
      GraphicsSpriteMesh.prototype.clear = function() {
        this.graphics.clear(true);
        if (cc.game.renderType === cc.game.RENDER_TYPE_WEBGL) {
          var vertices = this._vertices;
          vertices.x.length = vertices.y.length = vertices.nu.length = vertices.nv.length = vertices.triangles.length = 0;
          this.sprite["setVertsDirty"]();
        }
      };
      __decorate([ property(cc.Sprite) ], GraphicsSpriteMesh.prototype, "sprite", void 0);
      GraphicsSpriteMesh = __decorate([ ccclass, requireComponent(cc.Graphics) ], GraphicsSpriteMesh);
      return GraphicsSpriteMesh;
    }(cc.Component);
    exports.default = GraphicsSpriteMesh;
    cc._RF.pop();
  }, {} ],
  Hole: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c9f862La4tBoIu7OhZZMcqY", "Hole");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var pro_screwlevel_1 = require("./pro_screwlevel");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Hole = function(_super) {
      __extends(Hole, _super);
      function Hole() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      Hole.prototype.start = function() {
        this.node.on(cc.Node.EventType.TOUCH_START, function(event) {
          pro_screwlevel_1.default.instance.onClickHole(event);
        }, this);
        pro_screwlevel_1.default.instance.regesitHole(this);
      };
      Hole = __decorate([ ccclass ], Hole);
      return Hole;
    }(cc.Component);
    exports.default = Hole;
    cc._RF.pop();
  }, {
    "./pro_screwlevel": "pro_screwlevel"
  } ],
  HttpRequest: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2a548NGgE1DCYO80xeoLjuG", "HttpRequest");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.HttpRequest = exports.HttpEvent = void 0;
    var Engine_1 = require("../Engine");
    var urls = {};
    var reqparams = {};
    var allUrls = {};
    var HttpEvent;
    (function(HttpEvent) {
      HttpEvent["NO_NETWORK"] = "http_request_no_network";
      HttpEvent["UNKNOWN_ERROR"] = "http_request_unknown_error";
      HttpEvent["TIMEOUT"] = "http_request_timout";
    })(HttpEvent = exports.HttpEvent || (exports.HttpEvent = {}));
    var HttpRequest = function(_super) {
      __extends(HttpRequest, _super);
      function HttpRequest() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.server = "https://dev.ultrafisher.yolor.cc:5018/api/";
        _this.timeout = 1e4;
        return _this;
      }
      Object.defineProperty(HttpRequest, "instance", {
        get: function() {
          if (null == this._instance) {
            var node = new cc.Node("HttpRequest");
            cc.game.addPersistRootNode(node);
            this._instance = node.addComponent(HttpRequest);
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      HttpRequest.prototype.init = function(json) {
        var data = json.json.httpConfig;
        allUrls = Object.freeze(data);
      };
      HttpRequest.prototype.get = function(name, completeCallback, errorCallback) {
        this.sendRequest(name, null, false, completeCallback, errorCallback);
      };
      HttpRequest.prototype.getWithParams = function(name, params, completeCallback, errorCallback) {
        this.sendRequest(name, params, false, completeCallback, errorCallback);
      };
      HttpRequest.prototype.getByArraybuffer = function(name, completeCallback, errorCallback) {
        this.sendRequest(name, null, false, completeCallback, errorCallback, "arraybuffer", false);
      };
      HttpRequest.prototype.getWithParamsByArraybuffer = function(name, params, completeCallback, errorCallback) {
        this.sendRequest(name, params, false, completeCallback, errorCallback, "arraybuffer", false);
      };
      HttpRequest.prototype.getUrl = function(HttpUrl) {
        if ("object" === typeof allUrls[HttpUrl]) return this.server + allUrls[HttpUrl][Engine_1.engine.CC_Platform];
        return this.server + allUrls[HttpUrl];
      };
      HttpRequest.prototype.getVCheck = function() {
        return allUrls["ChangeNet"];
      };
      HttpRequest.prototype.post = function(name, params, completeCallback, errorCallback) {
        this.sendRequest(name, params, true, completeCallback, errorCallback);
      };
      HttpRequest.prototype.abort = function(name) {
        var xhr = urls[this.server + name];
        xhr && xhr.abort();
      };
      HttpRequest.prototype.getParamString = function(params) {
        var result = "";
        for (var name in params) {
          var data = params[name];
          if (data instanceof Object) for (var key in data) result += key + "=" + data[key] + "&"; else result += name + "=" + data + "&";
        }
        return result.substr(0, result.length - 1);
      };
      HttpRequest.prototype.sendRequest = function(name, params, isPost, completeCallback, errorCallback, responseType, isOpenTimeout, timeout) {
        var _this = this;
        void 0 === isOpenTimeout && (isOpenTimeout = true);
        void 0 === timeout && (timeout = this.timeout);
        if (null == name || "" == name) {
          cc.error("\u8bf7\u6c42\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a");
          return;
        }
        var url, newUrl, paramsStr;
        url = 0 == name.toLocaleLowerCase().indexOf("http") ? name : this.server + name;
        if (params) {
          paramsStr = this.getParamString(params);
          newUrl = url.indexOf("?") > -1 ? url + "&" + paramsStr : url + "?" + paramsStr;
        } else newUrl = url;
        if (null != urls[newUrl] && reqparams[newUrl] == paramsStr) {
          cc.warn("\u5730\u5740\u3010" + url + "\u3011\u5df2\u6b63\u5728\u8bf7\u6c42\u4e2d\uff0c\u4e0d\u80fd\u91cd\u590d\u8bf7\u6c42");
          return;
        }
        var xhr = new XMLHttpRequest();
        urls[newUrl] = xhr;
        reqparams[newUrl] = paramsStr;
        isPost ? xhr.open("POST", url, true) : xhr.open("GET", newUrl);
        xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        var data = {};
        data.url = url;
        data.params = params;
        if (isOpenTimeout) {
          xhr.timeout = timeout;
          xhr.ontimeout = function() {
            _this.deleteCache(newUrl);
            data.event = HttpEvent.TIMEOUT;
            errorCallback && errorCallback(data);
          };
        }
        xhr.onloadend = function(a) {
          if (500 == xhr.status) {
            _this.deleteCache(newUrl);
            if (null == errorCallback) return;
            data.event = HttpEvent.NO_NETWORK;
            errorCallback && errorCallback(data);
          }
        };
        xhr.onerror = function() {
          _this.deleteCache(newUrl);
          if (null == errorCallback) return;
          0 == xhr.readyState || 1 == xhr.readyState || 0 == xhr.status ? data.event = HttpEvent.NO_NETWORK : data.event = HttpEvent.UNKNOWN_ERROR;
          errorCallback && errorCallback(data);
        };
        xhr.onreadystatechange = function() {
          if (4 != xhr.readyState) return;
          _this.deleteCache(newUrl);
          if (200 == xhr.status && completeCallback) if ("arraybuffer" == responseType) {
            xhr.responseType = responseType;
            completeCallback && completeCallback(xhr.response);
          } else {
            var data = JSON.parse(xhr.response);
            null != data.code ? 0 == data.code ? completeCallback && completeCallback(data.data) : errorCallback && errorCallback(data) : completeCallback && completeCallback(data);
          }
        };
        null == params || "" == params ? xhr.send() : xhr.send(JSON.stringify(params));
      };
      HttpRequest.prototype.deleteCache = function(url) {
        delete urls[url];
        delete reqparams[url];
      };
      return HttpRequest;
    }(cc.Component);
    exports.HttpRequest = HttpRequest;
    cc._RF.pop();
  }, {
    "../Engine": "Engine"
  } ],
  HuaWei: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2fab6tvKh9H1KRcJ+BvoDTc", "HuaWei");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.HuaWei = void 0;
    var ResLoader_1 = require("../common/loader/ResLoader");
    var HuaWei = function() {
      function HuaWei() {
        var _this = this;
        this.checkShortcutTime = 0;
        this.nativeIconSprite = null;
        this.videoTimeInterval = 0;
        ResLoader_1.resLoader.loadDir("config", function() {
          var config = ResLoader_1.resLoader.get("config/config").json;
          _this._rewardedADId = config.AdvertisingID.rewardedVideoADIdForOPPO;
          _this._rewardedADId2 = config.AdvertisingID.rewardedVideoADIdForOPPO2;
          _this._bannerADId = config.AdvertisingID.bannerVideoADIdForOPPO;
          _this._bannerADId2 = config.AdvertisingID.bannerVideoADIdForOPPO2;
          _this._customAdUnitAD = config.AdvertisingID.customVideoADIdForOPPO;
          _this._customAdUnitAD2 = config.AdvertisingID.customVideoADIdForOPPO2;
          _this._customAdUnitAD3 = config.AdvertisingID.customVideoADIdForOPPO3;
          _this._customAdUnitAD4 = config.AdvertisingID.customVideoADIdForOPPO4;
          _this._SquaredUpNumAd = config.AdvertisingID.SquaredUpVideoADIdForOPPO;
          _this._title = config.Share.Title;
          _this._desc = config.Share.Desc;
          _this._imageUrl = config.Share.ImageUrl;
          _this._shareTemplateId = config.Share.TemplateId;
        });
      }
      HuaWei.prototype.init = function() {
        var qg = window["qg"];
        var info = qg.getSystemInfoSync();
        this.wide = info.screenWidth;
        this.high = info.screenHeight;
        this.version = info.platformVersionCode;
        this.nativeIconState = {};
        this.nativeState = {};
        this.bannerState = false;
        SdkManager.instance.log("   \u521d\u59cb\u5316->\u5bbd:" + this.wide + "    \u9ad8\uff1a" + this.high + " \u5e73\u53f0\u7248\u672c\uff1a" + this.version);
        this.preloadVideo(false);
      };
      HuaWei.prototype.installShortcut = function(callBack) {
        var me = this;
        this.hasShortcut(function(has) {
          if (!has && me.checkShortcut()) {
            var qg = window["qg"];
            qg.installShortcut({
              success: function() {
                callBack && callBack(true);
              },
              fail: function(err) {
                callBack && callBack(false);
              }
            });
          }
        });
      };
      HuaWei.prototype.checkShortcut = function() {
        var now = Date.now();
        SdkManager.instance.log("checkShortcut\u2014\u2014\u2014\u2014", now, "--------", this.checkShortcutTime);
        if (now - this.checkShortcutTime > 12e4) {
          this.checkShortcutTime = now;
          return true;
        }
        return false;
      };
      HuaWei.prototype.hasShortcut = function(callBack) {
        var qg = window["qg"];
        qg.hasShortcutInstalled({
          success: function(status) {
            SdkManager.instance.log("\u68c0\u6d4b\u684c\u9762\u56fe\u6807\u2014\u2014\u2014\u2014", status);
            callBack && callBack(status);
          },
          fail: function(err) {
            SdkManager.instance.log("check error", err);
          }
        });
      };
      HuaWei.prototype.showBanner = function() {
        var me = this;
        SdkManager.instance.log("showBanner \u534e\u4e3a\u5e7f\u544a");
        me.createNormalBanner();
      };
      HuaWei.prototype.createNormalBanner = function() {
        var me = this;
        if (SdkManager.instance.plat.version < 1078) {
          SdkManager.instance.log("\u534e\u4e3a\u5feb\u5e94\u7528\u5e73\u53f0\u7248\u672c\u53f7\u4f4e\u4e8e1078\uff0c\u6682\u4e0d\u652f\u6301banner\u5e7f\u544a\uff0c\u5f53\u524d\u5e73\u53f0\u7248\u672c:" + SdkManager.instance.plat.version);
          return;
        }
        var id = me.bannerID;
        SdkManager.instance.log("\u521b\u5efa banner \u5e7f\u544a:" + id);
        if (!me.normalBanner) {
          var qg = window["qg"];
          var info = qg.getSystemInfoSync();
          console.log("on getSystemInfoSync: success =" + JSON.stringify(info));
          var bannerTop = info.safeArea.height;
          var normalBanner_1 = qg.createBannerAd({
            adUnitId: "testw6vs28auh3",
            style: {
              top: bannerTop - 57,
              left: 0,
              height: 57,
              width: 360
            }
          });
          normalBanner_1.onError(function(err) {
            SdkManager.instance.log("\u83b7\u53d6banner\u5e7f\u544a\u9519\u8bef--------\x3e:" + JSON.stringify(err) + "\u5e7f\u544aid\uff1a" + normalBanner_1.adUnitId);
            me.bannerState = false;
          });
          normalBanner_1.onLoad(function() {
            SdkManager.instance.log("banner \u5e7f\u544a\u52a0\u8f7d\u6210\u529f");
          });
          me.normalBanner = normalBanner_1;
          setTimeout(function() {
            me.normalBanner.show();
          }, 1e3);
        }
      };
      HuaWei.prototype.hideBanner = function() {
        if (this.normalBanner) {
          SdkManager.instance.log("\u9690\u85cfnormalBanner");
          this.normalBanner.hide();
          this.normalBanner.destroy();
          this.normalBanner = null;
          this.bannerState = false;
        }
      };
      HuaWei.prototype._loadInterstitial = function(show) {
        var me = this;
        SdkManager.instance.log("\u521b\u5efa\u534e\u4e3a\u63d2\u5c4f");
        var qg = window["qg"];
        me.interstitiaAd = qg.createInterstitialAd({
          adUnitId: me.InterstitialID
        });
        me.interstitiaAd.onLoad(onLoadHandle);
        function onLoadHandle() {
          SdkManager.instance.log("\u52a0\u8f7d\u534e\u4e3a\u63d2\u5c4f\u5b8c\u6210");
          me.interstitiaAdCanShow = true;
          me.interstitiaAdcanReTry = true;
          me.interstitiaAd.show().then(function() {
            me.interstitiaAdCanShow = false;
            SdkManager.instance.InterstitialTime = 0;
            console.log("\u63d2\u5c4f\u5e7f\u544a\u5c55\u793a\u6210\u529f");
          });
        }
        me.interstitiaAd.onError(onErrorHandle);
        function onErrorHandle(err) {
          SdkManager.instance.log("\u52a0\u8f7d\u534e\u4e3a\u63d2\u5c4f\u5931\u8d25" + err);
          if (me.interstitiaAdcanReTry) {
            me.interstitiaAdcanReTry = false;
            me.interstitiaAd.load();
          } else qg.showToast({
            title: "\u6682\u65e0\u5e7f\u544a",
            icon: "none"
          });
        }
        me.interstitiaAd.onClose(onCloseHandle);
        function onCloseHandle() {
          me.interstitiaAdCanShow = false;
          SdkManager.instance.log("\u9500\u6bc1\u534e\u4e3a\u63d2\u5c4f");
          me.interstitiaAd.destroy();
          me.interstitiaAd = null;
        }
      };
      HuaWei.prototype.showNativeIcon = function(id, parent, posY, callBack) {
        SdkManager.instance.log("\u5c55\u793a\u539f\u751ficon:" + SdkManager.instance.canShowOPPOAD);
        if (!SdkManager.instance.canShowOPPOAD) return;
        var me = this;
        this.nativeIconState[me.iconAdsID] = 1;
        if (this.nativeIconSprite && this.nativeIconSprite.node) {
          SdkManager.instance.log(" oppp  native 1:" + me.iconAdsID);
          me.nativeIconSprite.createNativeIcon(me.iconAdsID);
          return;
        }
        if (me.isLoadingNativeIcon) return;
        me.isLoadingNativeIcon = true;
        SdkManager.instance.log(" \u52a0\u8f7d \u539f\u751ficon \u8d44\u6e90:" + me.iconAdsID);
        resources.load("sdkPrefab/OppoNativeIcon", Prefab, function(err, prefab) {
          var newNode = instantiate(prefab);
          var nativeIconNode = newNode.getComponent(oppoNativeIcon);
          SdkManager.instance.log(" \u52a0\u8f7d \u539f\u751ficon \u8d44\u6e90\u5b8c\u6210:" + me.iconAdsID);
          if (nativeIconNode) {
            if (me.nativeIconState[me.iconAdsID]) {
              SdkManager.instance.log(" oppp  \u539f\u751ficon 2:" + me.iconAdsID);
              nativeIconNode.createNativeIcon(me.iconAdsID);
            } else nativeIconNode.node.active = false;
            UIManager.instance._gameView && newNode.setParent(UIManager.instance._gameView.nativeIcon);
            newNode.position = new Vec3(0, 0, 0);
            me.nativeIconSprite = nativeIconNode;
          }
        });
      };
      HuaWei.prototype.hideNativeIcon = function(id) {
        SdkManager.instance.log("\u9690\u85cfnative:" + id);
      };
      HuaWei.prototype.showNative = function(id, parent, posY, callBack) {
        if (!SdkManager.instance.canShowOPPOAD) return;
        SdkManager.instance.log("\u5c55\u793anative:" + id + " posY:" + posY);
        SdkManager.instance.hideBanner(0);
        var me = this;
        this.nativeState[id] = 1;
        me.nativeId = id;
        if (this.native && this.native.node) {
          SdkManager.instance.log(" oppp  native 1:" + me.nativeId);
          this.native.init(me.nativeId);
          return;
        }
        if (me.isLoadingNative) return;
        me.isLoadingNative = true;
        SdkManager.instance.log(" \u52a0\u8f7d native \u8d44\u6e90:" + me.nativeId);
        resources.load("sdkPrefab/OppoNative", Prefab, function(err, prefab) {
          var newNode = instantiate(prefab);
          var native = newNode.getComponent(OppoNative);
          SdkManager.instance.log(" \u52a0\u8f7d native \u8d44\u6e90\u5b8c\u6210:" + me.nativeId);
          if (native) {
            if (me.nativeState[me.nativeId]) {
              SdkManager.instance.log(" oppp  native 2:" + me.nativeId);
              native.init(me.nativeId);
            } else native.setShow(false);
            UIManager.instance && newNode.setParent(UIManager.instance.nativeAdView);
            newNode.position = new Vec3(0, 0, 0);
            me.native = native;
          }
        });
      };
      HuaWei.prototype.hideNative = function(id) {
        SdkManager.instance.log("\u9690\u85cfnative:" + id);
      };
      HuaWei.prototype.preloadVideo = function(autoShow) {
        void 0 === autoShow && (autoShow = false);
        var me = this;
        var id = me.VideoID;
        SdkManager.instance.log("\u9884\u52a0\u8f7d\u6fc0\u52b1\u5e7f\u544a\u2014\u2014>", id);
        var qg = window["qg"];
        me.videoIsCreator ? me.videoAds.load() : me.videoAds = qg.createRewardedVideoAd({
          adUnitId: id,
          success: function(code) {
            me.videoAds.onLoad(function() {
              SdkManager.instance.log("\u52a0\u8f7d\u6fc0\u52b1\u5e7f\u544a\u5b8c\u6210");
              autoShow && me.videoAds.show();
            });
            me.videoAds.onError(function(err) {
              SdkManager.instance.log("\u6fc0\u52b1\u89c6\u9891\uff0c\u5931\u8d25->", JSON.stringify(err));
            });
            me.videoAds.load();
            me.videoIsCreator = true;
            console.log("ad demo : loadAndShowVideoAd createRewardedVideoAd: success");
          },
          fail: function(data, code) {
            console.log("ad demo : loadAndShowVideoAd createRewardedVideoAd fail: " + data + "," + code);
            me.videoIsCreator = false;
            me.videoAds = null;
          }
        });
      };
      HuaWei.prototype.showVideo = function(adResFun) {
        console.log("\u5f00\u59cb\u89c6\u9891");
        var me = this;
        if (me.videoIsCreator) {
          me.videoAds.onClose(function(res) {
            SdkManager.instance.log("\u5e7f\u544a\u5173\u95ed->", JSON.stringify(res));
            res && res.isEnded || void 0 === res ? adResFun && adResFun(true) : adResFun && adResFun(false);
            me.videoAds.offClose();
            me.videoAds.load();
            adResFun = null;
          });
          me.checkVideoTimeInterval() && me.videoAds.show();
        } else {
          me.preloadVideo(true);
          me.videoAds.onClose(function(res) {
            SdkManager.instance.log("\u5e7f\u544a\u5173\u95ed->", JSON.stringify(res));
            res && res.isEnded || void 0 === res ? adResFun && adResFun(true) : adResFun && adResFun(false);
            me.videoAds.offClose();
            me.videoAds.load();
            adResFun = null;
          });
        }
      };
      HuaWei.prototype.checkVideoTimeInterval = function() {
        var now = Date.now();
        SdkManager.instance.log("\u8ddd\u4e0a\u6b21\u6fc0\u52b1\u89c6\u9891\u64ad\u653e", this.videoTimeInterval / 1e3);
        if (now - this.videoTimeInterval > 1e4) {
          this.videoTimeInterval = now;
          return true;
        }
        return false;
      };
      HuaWei.prototype.reportMonitor = function() {};
      HuaWei.prototype.umaTrackEvent = function(key, params) {};
      return HuaWei;
    }();
    exports.HuaWei = HuaWei;
    cc._RF.pop();
  }, {
    "../common/loader/ResLoader": "ResLoader"
  } ],
  HxpgManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0c84bE4KMZOcYpapACN9Fti", "HxpgManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var HxpgManager = function() {
      function HxpgManager() {
        this.hxpg_Gq = 0;
      }
      HxpgManager = __decorate([ ccclass ], HxpgManager);
      return HxpgManager;
    }();
    exports.default = HxpgManager;
    cc._RF.pop();
  }, {} ],
  IPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "89dd3CWaQhLvqpETdGI29TC", "IPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    cc._RF.pop();
  }, {} ],
  ImageUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0f034ewqUxBc7FBtbjGLiyM", "ImageUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ImageUtil = function() {
      function ImageUtil() {}
      ImageUtil.getPixelColor = function(texture, x, y) {
        var canvas = document.createElement("canvas");
        var ctx = canvas.getContext("2d");
        canvas.width = texture.width;
        canvas.height = texture.height;
        var image = texture.getHtmlElementObj();
        ctx.drawImage(image, 0, 0, texture.width, texture.height);
        var imageData = ctx.getImageData(0, 0, texture.width, texture.height);
        var pixelIndex = (y - 1) * texture.width * 4 + 4 * (x - 1);
        var pixelData = imageData.data.slice(pixelIndex, pixelIndex + 4);
        var color = new cc.Color(pixelData[0], pixelData[1], pixelData[2], pixelData[3]);
        image.remove();
        canvas.remove();
        return color;
      };
      ImageUtil.imageToBase64 = function(url, callback) {
        return new Promise(function(res) {
          var _a;
          var extname = null === (_a = /\.png|\.jpg|\.jpeg/.exec(url)) || void 0 === _a ? void 0 : _a[0];
          if ([ ".png", ".jpg", ".jpeg" ].includes(extname)) {
            var canvas_1 = document.createElement("canvas");
            var ctx_1 = canvas_1.getContext("2d");
            var image_1 = new Image();
            image_1.src = url;
            image_1.onload = function() {
              canvas_1.height = image_1.height;
              canvas_1.width = image_1.width;
              ctx_1.drawImage(image_1, 0, 0);
              extname = ".jpg" === extname ? "jpeg" : extname.replace(".", "");
              var dataURL = canvas_1.toDataURL("image/" + extname);
              callback && callback(dataURL);
              res(dataURL);
              image_1.remove();
              canvas_1.remove();
            };
          } else {
            console.warn("Not a jpg/jpeg or png resource!");
            callback && callback("");
            res("");
          }
        });
      };
      ImageUtil.base64ToTexture = function(base64) {
        var image = document.createElement("img");
        image.src = base64;
        var texture = new cc.Texture2D();
        texture.initWithElement(image);
        image.remove();
        return texture;
      };
      ImageUtil.base64ToBlob = function(base64) {
        var strings = base64.split(",");
        var type = /image\/\w+|;/.exec(strings[0])[0];
        var data = window.atob(strings[1]);
        var arrayBuffer = new ArrayBuffer(data.length);
        var uint8Array = new Uint8Array(arrayBuffer);
        for (var i = 0; i < data.length; i++) uint8Array[i] = 255 & data.charCodeAt(i);
        return new Blob([ uint8Array ], {
          type: type
        });
      };
      return ImageUtil;
    }();
    exports.default = ImageUtil;
    cc._RF.pop();
  }, {} ],
  Initialize: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d3bd0G9THtNHaQEyRqj6wdv", "Initialize");
    "use strict";
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Initialize = void 0;
    var MessageManager_1 = require("../../core/common/event/MessageManager");
    var ResLoader_1 = require("../../core/common/loader/ResLoader");
    var AsyncQueue_1 = require("../../core/common/queue/AsyncQueue");
    var Engine_1 = require("../../core/Engine");
    var Root_1 = require("../../core/Root");
    var GameEvent_1 = require("../../game/common/config/GameEvent");
    var GameUIConfig_1 = require("../../game/common/config/GameUIConfig");
    var SingletonModuleComp_1 = require("../../game/SingletonModuleComp");
    var Login_1 = require("./Login");
    var Initialize = function() {
      function Initialize() {
        this.queue = null;
        this.addEvent();
        this.queue = new AsyncQueue_1.AsyncQueue();
        this.loadCommon(this.queue);
        this.loadLogin(this.queue);
        this.queue.play();
      }
      Initialize.prototype.addEvent = function() {
        MessageManager_1.Message.on(GameEvent_1.GameEvent.LoginSuccess, this.onHandler, this);
      };
      Initialize.prototype.onHandler = function(event, args) {
        switch (event) {
         case GameEvent_1.GameEvent.LoginSuccess:
          this.onComplete(this.queue);
          this.queue.play();
        }
      };
      Initialize.prototype.loadCommon = function(queue) {
        var _this = this;
        queue.push(function(next, params, args) {
          return __awaiter(_this, void 0, void 0, function() {
            return __generator(this, function(_a) {
              ResLoader_1.resLoader.loadDir("common", next);
              return [ 2 ];
            });
          });
        });
      };
      Initialize.prototype.loadLogin = function(queue) {
        var _this = this;
        queue.push(function(next, params, args) {
          return __awaiter(_this, void 0, void 0, function() {
            return __generator(this, function(_a) {
              next();
              Engine_1.engine.gui.openOfParent(GameUIConfig_1.UIID.Login, Engine_1.engine.RootNode.getComponent(Root_1.Root).OtherNode, function(node) {
                SingletonModuleComp_1.SingletonModule.login = node.getComponent(Login_1.Login);
              });
              return [ 2 ];
            });
          });
        });
      };
      Initialize.prototype.onComplete = function(queue) {
        queue.complete = function() {
          console.log("\u52a0\u8f7d\u6e38\u620f\u8fdb\u5ea6");
          Engine_1.engine.gui.openOfParent(GameUIConfig_1.UIID.Loading, Engine_1.engine.RootNode.getComponent(Root_1.Root).OtherNode, function(node) {
            console.log("\u6253\u5f00\u4e86\u8fdb\u5ea6\u6761");
          });
        };
      };
      return Initialize;
    }();
    exports.Initialize = Initialize;
    cc._RF.pop();
  }, {
    "../../core/Engine": "Engine",
    "../../core/Root": "Root",
    "../../core/common/event/MessageManager": "MessageManager",
    "../../core/common/loader/ResLoader": "ResLoader",
    "../../core/common/queue/AsyncQueue": "AsyncQueue",
    "../../game/SingletonModuleComp": "SingletonModuleComp",
    "../../game/common/config/GameEvent": "GameEvent",
    "../../game/common/config/GameUIConfig": "GameUIConfig",
    "./Login": "Login"
  } ],
  JsonOb: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "dc61aCYyldD7J/ZPWhNqUIY", "JsonOb");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.JsonOb = void 0;
    var OP = Object.prototype;
    var types = {
      obj: "[object Object]",
      array: "[object Array]"
    };
    var OAM = [ "push", "pop", "shift", "unshift", "sort", "reverse", "splice" ];
    var JsonOb = function() {
      function JsonOb(obj, callback) {
        OP.toString.call(obj) !== types.obj && OP.toString.call(obj) !== types.array && console.error("\u8bf7\u4f20\u5165\u4e00\u4e2a\u5bf9\u8c61\u6216\u6570\u7ec4");
        this._callback = callback;
        this.observe(obj);
      }
      JsonOb.prototype.observe = function(obj, path) {
        var _this = this;
        OP.toString.call(obj) === types.array && this.overrideArrayProto(obj, path);
        Object.keys(obj).forEach(function(key) {
          var self = _this;
          var oldVal = obj[key];
          var pathArray = path && path.slice();
          pathArray ? pathArray.push(key) : pathArray = [ key ];
          Object.defineProperty(obj, key, {
            get: function() {
              return oldVal;
            },
            set: function(newVal) {
              if (oldVal !== newVal) {
                "[object Object]" === OP.toString.call(newVal) && self.observe(newVal, pathArray);
                self._callback(newVal, oldVal, pathArray);
                oldVal = newVal;
              }
            }
          });
          OP.toString.call(obj[key]) !== types.obj && OP.toString.call(obj[key]) !== types.array || _this.observe(obj[key], pathArray);
        }, this);
      };
      JsonOb.prototype.overrideArrayProto = function(array, path) {
        var originalProto = Array.prototype;
        var overrideProto = Object.create(Array.prototype);
        var self = this;
        var result;
        var _loop_1 = function(i) {
          var method = OAM[i];
          Object.defineProperty(overrideProto, method, {
            value: function() {
              var oldVal = this.slice();
              result = originalProto[method].apply(this, arguments);
              self.observe(this, path);
              self._callback(this, oldVal, path);
              return result;
            }
          });
        };
        for (var i = 0; i < OAM.length; i++) _loop_1(i);
        array["__proto__"] = overrideProto;
      };
      return JsonOb;
    }();
    exports.JsonOb = JsonOb;
    cc._RF.pop();
  }, {} ],
  JsonUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "16107VFekVHn4xdHyUDERfq", "JsonUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.JsonUtil = exports.JsonConfig = void 0;
    var Config_1 = require("../../game/common/config/Config");
    var ResLoader_1 = require("../common/loader/ResLoader");
    var JsonConfig;
    (function(JsonConfig) {
      JsonConfig["gk"] = "JsonConfig/gk";
    })(JsonConfig = exports.JsonConfig || (exports.JsonConfig = {}));
    var data = new Map();
    var JsonUtil = function() {
      function JsonUtil() {}
      JsonUtil.get = function(name) {
        if (data.has(name)) return data.get(name);
      };
      JsonUtil.load = function(name, callback) {
        if (data.has(name)) callback(data.get(name)); else {
          var url = Config_1.config.game.getConfigPath(name);
          ResLoader_1.resLoader.load(url, cc.JsonAsset, function(err, content) {
            err && cc.error(err.message);
            data.set(name, content.json.Data);
            callback(content.json);
          });
        }
      };
      JsonUtil.loadAsync = function(bundle, name) {
        return new Promise(function(resolve, reject) {
          var _name = null;
          _name = name || bundle;
          if (data.has(_name)) resolve(data.get(_name)); else {
            var url = Config_1.config.game.getConfigPath(_name);
            _name === name ? ResLoader_1.resLoader.load(bundle, url, cc.JsonAsset, function(err, content) {
              err && cc.error(err.message);
              data.set(_name, content.json.Data);
              cc.log("\u7ed3\u675f\u52a0\u8f7dJSON");
              resolve(content.json);
            }) : ResLoader_1.resLoader.load(url, cc.JsonAsset, function(err, content) {
              err && cc.error(err.message);
              data.set(_name, content.json.Data);
              cc.log("\u7ed3\u675f\u52a0\u8f7dJSON");
              resolve(content.json);
            });
          }
        });
      };
      JsonUtil.loadAsyncTB = function(bundle, name, callback) {
        if (data.has(name)) callback && callback(); else {
          var url = Config_1.config.game.getConfigPath(name);
          ResLoader_1.resLoader.load(bundle, url, cc.JsonAsset, function(err, content) {
            err && cc.error(err.message);
            data.set(name, content.json.Data);
            cc.log("\u7ed3\u675f\u52a0\u8f7dJSON");
            callback && callback();
          });
        }
      };
      JsonUtil.release = function(name) {
        var url = Config_1.config.game.getConfigPath(name);
        data.delete(name);
        ResLoader_1.resLoader.releaseDir(url);
      };
      return JsonUtil;
    }();
    exports.JsonUtil = JsonUtil;
    cc._RF.pop();
  }, {
    "../../game/common/config/Config": "Config",
    "../common/loader/ResLoader": "ResLoader"
  } ],
  KsPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8a969Ca2cBEj4WMZdR+XKPX", "KsPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.KsPlatform = void 0;
    var ResLoader_1 = require("../common/loader/ResLoader");
    var Engine_1 = require("../Engine");
    var PlatformManager_1 = require("./PlatformManager");
    var KsPlatform = function() {
      function KsPlatform() {
        var _this = this;
        this._isRecording = false;
        this._isRecordFinished = false;
        this._recorder = null;
        this._startTime = 0;
        this._videoID = null;
        this._MinRecordTime = 5e3;
        this._MaxRecordTime = 12e4;
        ResLoader_1.resLoader.loadDir("config", function() {
          var config = ResLoader_1.resLoader.get("config/config").json;
          _this._rewardedADId = config.AdvertisingID.rewardedVideoADIdForKS;
          _this._interstitialADId = config.AdvertisingID.interstitialVideoADIdForKS;
          _this._interstitialAdChances = config.InterstitialAdChances.value;
          _this._title = config.Share.Title;
          _this._desc = config.Share.Desc;
          _this._imageUrl = config.Share.ImageUrl;
        });
      }
      KsPlatform.prototype.init = function() {
        var self = this;
        ks.getSystemInfo({
          success: function(res) {
            self._systemInfo = res;
          },
          fail: function(res) {}
        });
        this.createRewardedAd();
        this.createInterstitialAd();
      };
      KsPlatform.prototype.exitGame = function() {
        qg.exitApplication();
      };
      KsPlatform.prototype.request = function(url, data, method, callback) {
        var requestCall = ks.request;
        requestCall ? requestCall({
          url: url,
          method: method,
          data: data,
          success: function(res) {
            200 == res.statusCode ? 0 == res.data.code ? callback && callback(true, res.data) : callback && callback(false, res.data.code) : callback && callback(false, res.statusCode);
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        }) : callback && callback(false, "requestCall\u4e3a\u7a7a");
      };
      KsPlatform.prototype.login = function(callback) {
        var _lauchInfo = ks.getLaunchOptionsSync();
        var shareId = 0;
        _lauchInfo.query && _lauchInfo.query.key && (shareId = _lauchInfo.query.key);
        var self = this;
        ks.login({
          success: function(res) {
            if (res.code) var data = {
              code: res.code,
              nameIt: true,
              referenceId: shareId,
              referenceType: 0,
              gameId: Engine_1.engine.gameId,
              shareId: "" + shareId
            }; else callback && callback(false, res.errMsg);
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        });
      };
      KsPlatform.prototype.getUserInfo = function(callback) {
        ks.getSetting({
          success: function(res) {
            res.authSetting["scope.userInfo"] ? ks.getUserInfo({
              success: function(res) {
                callback && callback(true, res);
              },
              fail: function(err) {
                callback && callback(false, err.errMsg);
              }
            }) : ks.authorize({
              scope: "scope.userInfo",
              success: function(res) {
                ks.getUserInfo({
                  success: function(res) {
                    callback && callback(true, res);
                  },
                  fail: function(err) {
                    callback && callback(false, err.errMsg);
                  }
                });
              },
              fail: function(err) {
                ks.getUserInfo({
                  success: function(res) {
                    callback && callback(true, res);
                  },
                  fail: function(err) {
                    callback && callback(false, err.errMsg);
                  }
                });
              }
            });
          },
          fail: function(err) {
            callback && callback(false, err.errMsg);
          }
        });
      };
      KsPlatform.prototype.saveUserInfo = function(userName, url, callback) {
        var data = {
          data: {
            nickname: userName,
            headUrl: url
          }
        };
        var self = this;
      };
      KsPlatform.prototype.getSystemInfo = function() {
        return this._systemInfo;
      };
      KsPlatform.prototype.restartGame = function() {
        ks.exitMiniProgram();
      };
      KsPlatform.prototype.isRecordingTooShort = function() {
        return !!(this._isRecording && Date.now() - this._startTime < this._MinRecordTime);
      };
      KsPlatform.prototype.getRecordStatu = function() {
        return this._isRecordFinished ? PlatformManager_1.RecordStatu.Finished : this._isRecording ? PlatformManager_1.RecordStatu.Recording : PlatformManager_1.RecordStatu.Inactive;
      };
      KsPlatform.prototype.startGameRecord = function() {
        var _this = this;
        if (this.getRecordStatu() != PlatformManager_1.RecordStatu.Inactive) return;
        this._recorder = ks.getGameRecorder();
        this._recorder.on("error", function(res) {});
        this._recorder.on("start", function(res) {
          _this._startTime = new Date().getTime();
          _this._isRecording = true;
        });
        this._recorder.on("stop", function(res) {
          _this._videoID = res.videoID;
          _this._isRecording = false;
          _this._isRecordFinished = true;
        });
        this._recorder.start();
      };
      KsPlatform.prototype.stopGameRecord = function() {
        if (this.getRecordStatu() != PlatformManager_1.RecordStatu.Recording) return;
        this._recorder.stop();
      };
      KsPlatform.prototype.shareGameRecord = function() {
        if (this.getRecordStatu() == PlatformManager_1.RecordStatu.Inactive) return;
        this.getRecordStatu() == PlatformManager_1.RecordStatu.Recording && this.stopGameRecord();
        this._recorder.publishVideo({
          video: this._videoID,
          callback: function(error) {
            if (null != error && void 0 != error) return;
          }
        });
        this._isRecordFinished = false;
        this._videoID = null;
      };
      KsPlatform.prototype.createRewardedAd = function() {
        var _this = this;
        this._rewardedAd = ks.createRewardedVideoAd({
          adUnitId: this._rewardedADId
        });
        try {
          cb && this._rewardedAd.offClose(cb);
        } catch (err) {}
        var cb = function(res) {
          res && res.isEnded ? _this._rewardedCallBack(true) : _this._rewardedCallBack(false);
        };
        this._rewardedAd.onClose(cb);
        this._rewardedAd.onError(function(err) {
          _this._rewardedCallBack(false);
        });
      };
      KsPlatform.prototype.createInterstitialAd = function() {
        this._interstitialAd = ks.createInterstitialAd({
          adUnitId: this._interstitialADId
        });
        if (this._interstitialAd) {
          this._interstitialAd.onClose(function(res) {});
          this._interstitialAd.onError(function(res) {});
        }
      };
      KsPlatform.prototype.showRewardedAd = function(callback) {
        var _this = this;
        if (null != this._rewardedAd) {
          this._rewardedCallBack = callback;
          this._rewardedAd.show().then(function() {}).catch(function(err) {
            _this.onShare(_this._rewardedCallBack);
          });
        } else this.onShare(this._rewardedCallBack);
      };
      KsPlatform.prototype.showInterstitialAd = function() {
        null != this._interstitialAd && Math.random() <= this._interstitialAdChances && this._interstitialAd.show().then(function() {}).catch(function(err) {});
      };
      KsPlatform.prototype.onShare = function(callback) {
        ks.shareAppMessage({
          query: "key=" + Engine_1.engine.netconfig.getuuid(),
          success: function() {
            callback(true);
          },
          fail: function(res) {
            callback(false);
          }
        });
      };
      KsPlatform.prototype.addShortcut = function(callback) {
        ks.saveAPKShortcut(function(result) {
          -10005 === result.code ? callback && callback(false) : 1 === result.code ? callback && callback(true) : callback && callback(false);
        });
      };
      KsPlatform.prototype.checkShortcut = function(callback) {
        ks.getAPKShortcutInstallStatus(function(result) {
          -10005 === result.code ? callback(false) : 1 === result.code ? result.installed || callback(true) : callback(false);
        });
      };
      KsPlatform.prototype.checkFollowState = function(callback) {
        ks.checkFollowState({
          accountType: "MiniGameOfficialAccount",
          callback: function(result) {
            -10005 === result.errorCode ? callback && callback(false) : callback && callback(true);
          }
        });
      };
      KsPlatform.prototype.openAwemeUserProfile = function(callback) {
        ks.openUserProfile({
          accountType: "MiniGameOfficialAccount",
          callback: function(result) {
            if (callback) {
              callback(true);
              return;
            }
          }
        });
        callback && callback(false);
      };
      KsPlatform.prototype.vibrateShort = function(vibrateType) {
        ks.vibrateShort({
          type: vibrateType,
          success: function() {},
          fail: function(res) {}
        });
      };
      KsPlatform.prototype.vibrateLong = function() {
        ks.vibrateLong({
          success: function() {},
          fail: function(res) {}
        });
      };
      return KsPlatform;
    }();
    exports.KsPlatform = KsPlatform;
    cc._RF.pop();
  }, {
    "../Engine": "Engine",
    "../common/loader/ResLoader": "ResLoader",
    "./PlatformManager": "PlatformManager"
  } ],
  LabelChange: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8d2662LxjtJaJTAU+I4P0aE", "LabelChange");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LabelChange = void 0;
    var LabelNumber_1 = require("./LabelNumber");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var LabelChange = function(_super) {
      __extends(LabelChange, _super);
      function LabelChange() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.isInteger = false;
        _this.duration = 0;
        _this.isBegin = false;
        _this.speed = 0;
        _this.end = 0;
        return _this;
      }
      LabelChange.prototype.changeTo = function(duration, end, callback) {
        if (0 == duration) {
          callback && callback();
          return;
        }
        this.playAnim(duration, this.num, end, callback);
      };
      LabelChange.prototype.changeBy = function(duration, value, callback) {
        if (0 == duration) {
          callback && callback();
          return;
        }
        this.playAnim(duration, this.num, this.num + value, callback);
      };
      LabelChange.prototype.stop = function(excCallback) {
        void 0 === excCallback && (excCallback = true);
        this.num = this.end;
        this.isBegin = false;
        excCallback && this.callback && this.callback();
      };
      LabelChange.prototype.playAnim = function(duration, begin, end, callback) {
        this.duration = duration;
        this.end = end;
        this.callback = callback;
        this.speed = (end - begin) / duration;
        this.num = begin;
        this.isBegin = true;
      };
      LabelChange.prototype.isEnd = function(num) {
        return this.speed > 0 ? num >= this.end : num <= this.end;
      };
      LabelChange.prototype.update = function(dt) {
        if (this.isBegin) {
          if (this.num == this.end) {
            this.isBegin = false;
            this.callback && this.callback();
            return;
          }
          var num = this.num + dt * this.speed;
          this.isInteger && (num = Math.ceil(num));
          if (this.isEnd(num)) {
            num = this.end;
            this.isBegin = false;
            this.callback && this.callback();
          }
          this.num = num;
        }
      };
      __decorate([ property ], LabelChange.prototype, "isInteger", void 0);
      LabelChange = __decorate([ ccclass, menu("ui/label/LabelChange") ], LabelChange);
      return LabelChange;
    }(LabelNumber_1.default);
    exports.LabelChange = LabelChange;
    cc._RF.pop();
  }, {
    "./LabelNumber": "LabelNumber"
  } ],
  LabelNumber: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f7950aytAhKD7LNnroV3NLx", "LabelNumber");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var LabelNumber = function(_super) {
      __extends(LabelNumber, _super);
      function LabelNumber() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._num = 0;
        _this._showSym = "";
        _this.useFix = true;
        return _this;
      }
      Object.defineProperty(LabelNumber.prototype, "num", {
        get: function() {
          return this._num;
        },
        set: function(value) {
          this._num = value;
          this.updateLabel();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(LabelNumber.prototype, "showSym", {
        get: function() {
          return this._showSym;
        },
        set: function(value) {
          if (value) {
            this._showSym = value;
            this.updateLabel();
          }
        },
        enumerable: false,
        configurable: true
      });
      LabelNumber.prototype.updateLabel = function() {
        "number" != typeof this._num && cc.error("[LabelNumber] num\u4e0d\u662f\u4e00\u4e2a\u5408\u6cd5\u6570\u5b57");
        this.string = this.num.toString();
      };
      __decorate([ property ], LabelNumber.prototype, "_num", void 0);
      __decorate([ property({
        tooltip: "\u662f\u5426\u663e\u793a\u8d27\u5e01\u7b26\u53f7"
      }) ], LabelNumber.prototype, "_showSym", void 0);
      __decorate([ property ], LabelNumber.prototype, "num", null);
      __decorate([ property ], LabelNumber.prototype, "showSym", null);
      __decorate([ property ], LabelNumber.prototype, "useFix", void 0);
      LabelNumber = __decorate([ ccclass, menu("ui/label/LabelNumber") ], LabelNumber);
      return LabelNumber;
    }(cc.Label);
    exports.default = LabelNumber;
    cc._RF.pop();
  }, {} ],
  LabelShowTime: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "1757bBqI8ZKGqeirMYL5dE7", "LabelShowTime");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var LabelShowTime = function(_super) {
      __extends(LabelShowTime, _super);
      function LabelShowTime() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      LabelShowTime = __decorate([ ccclass, menu("ui/label/LabelShowTime") ], LabelShowTime);
      return LabelShowTime;
    }(cc.Label);
    exports.default = LabelShowTime;
    cc._RF.pop();
  }, {} ],
  LabelTime: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0ad43K9BrNA/7GF+kxLq7oW", "LabelTime");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../Engine");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var LabelTime = function(_super) {
      __extends(LabelTime, _super);
      function LabelTime() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.countDownBack = 10;
        _this.countDown = 10;
        _this.dayFormat = "{0} day";
        _this.timeFormat = "{0}:{1}:{2}";
        _this.zeroize = true;
        _this.countDownTime = 0;
        return _this;
      }
      LabelTime.prototype.replace = function(value) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) args[_i - 1] = arguments[_i];
        return value.replace(/\{(\d+)\}/g, function(m, i) {
          return args[i];
        });
      };
      LabelTime.prototype.format = function() {
        var c = this.countDown;
        var date = Math.floor(c / 86400);
        c -= 86400 * date;
        var hours = Math.floor(c / 3600);
        c -= 3600 * hours;
        var minutes = Math.floor(c / 60);
        c -= 60 * minutes;
        var seconds = c;
        this.dateDisable = this.dateDisable || false;
        if (0 == date && 0 == hours && 0 == minutes && 0 == seconds) this.zeroize ? this.result = this.replace(this.timeFormat, "00", "00", "00") : this.result = this.replace(this.timeFormat, "0", "0", "0"); else if (date > 0 && !this.dateDisable) {
          var dataFormat = this.dayFormat;
          var index = dataFormat.indexOf("{1}");
          0 == hours && index > -1 && (dataFormat = dataFormat.substring(0, index - 1));
          var df = dataFormat;
          date > 1 && dataFormat.indexOf("days") < 0 && (df = df.replace("day", "days"));
          date < 2 && (df = df.replace("days", "day"));
          this.result = this.replace(df, date, hours);
        } else {
          hours += 24 * date;
          this.zeroize ? this.result = this.replace(this.timeFormat, this.coverString(hours), this.coverString(minutes), this.coverString(seconds)) : this.result = this.replace(this.timeFormat, hours, minutes, seconds);
        }
        this.string = this.result;
      };
      LabelTime.prototype.coverString = function(value) {
        if (value < 10) return "0" + value;
        return value.toString();
      };
      LabelTime.prototype.setDateDisable = function(flag) {
        this.dateDisable = flag;
      };
      LabelTime.prototype.setCdTime = function(second) {
        this.countDown = second;
        this.countDownTime = new Date().getTime() + 1e3 * second;
        this.format();
      };
      LabelTime.prototype.setCdBackTime = function(second) {
        this.countDownBack = second;
      };
      LabelTime.prototype.cdBackEvent = function() {
        this.setCdTime(this.countDownBack);
      };
      LabelTime.prototype.onLoad = function() {
        this.enabled = true;
      };
      LabelTime.prototype.start = function() {
        this.format();
        this.enabled = true;
        true;
        this.timeId = Engine_1.engine.timer.registerObject(this, "countDown", this.onSecond, this.onComplete);
      };
      LabelTime.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
        this.cdBackEvent();
      };
      LabelTime.prototype.onDisable = function() {};
      LabelTime.prototype.onDestroy = function() {
        true;
        Engine_1.engine.timer.unRegisterObject(this.timeId);
      };
      LabelTime.prototype.onSecond = function() {
        this.format();
        this.second && this.second(this.node);
      };
      LabelTime.prototype.onComplete = function() {
        this.complete && this.complete(this.node);
      };
      __decorate([ property({
        tooltip: "\u5012\u8ba1\u65f6\u56de\u5f52\u65f6\u95f4"
      }) ], LabelTime.prototype, "countDownBack", void 0);
      __decorate([ property({
        tooltip: "\u5230\u8ba1\u65f6\u95f4\u603b\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09"
      }) ], LabelTime.prototype, "countDown", void 0);
      __decorate([ property({
        tooltip: "\u5929\u6570\u6570\u636e\u683c\u5f0f\u5316"
      }) ], LabelTime.prototype, "dayFormat", void 0);
      __decorate([ property({
        tooltip: "\u65f6\u95f4\u683c\u5f0f\u5316"
      }) ], LabelTime.prototype, "timeFormat", void 0);
      __decorate([ property({
        tooltip: "\u662f\u5426\u670900"
      }) ], LabelTime.prototype, "zeroize", void 0);
      LabelTime = __decorate([ ccclass, menu("ui/label/LabelTime") ], LabelTime);
      return LabelTime;
    }(cc.Label);
    exports.default = LabelTime;
    cc._RF.pop();
  }, {
    "../../Engine": "Engine"
  } ],
  LayerAction: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "af3f77MfQJGSZ0YakN4wTBm", "LayerAction");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerAction = void 0;
    var Engine_1 = require("../../Engine");
    var LayerAction = function() {
      function LayerAction() {}
      LayerAction.downToUpAction = {
        onAdded: function(node, params) {
          var transform = node.getComponent(UITransform);
          node.position.subtract3f(0, Engine_1.engine.gui.ScreenHeight / 2 + transform.height / 2, 0);
          cc.tween(node).to(1, {
            position: new cc.Vec3(0, -Engine_1.engine.gui.ScreenHeight / 2 + transform.height / 2, 0)
          }).start().call(function() {
            cc.tween(node).stop();
          });
        }
      };
      return LayerAction;
    }();
    exports.LayerAction = LayerAction;
    cc._RF.pop();
  }, {
    "../../Engine": "Engine"
  } ],
  LayerDialog: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d2d66sw9ylAbKZlDCW+an5w", "LayerDialog");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerDialog = void 0;
    var ResLoader_1 = require("../../common/loader/ResLoader");
    var Defines_1 = require("./Defines");
    var LayerPopup_1 = require("./LayerPopup");
    var LayerDialog = function(_super) {
      __extends(LayerDialog, _super);
      function LayerDialog() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.queue = [];
        return _this;
      }
      LayerDialog.prototype.add = function(config, params, callbacks) {
        this.black.enabled = true;
        var self = this;
        var prefabPath = config.prefab;
        var uuid = this.getUuid(prefabPath);
        var viewParams = this.ui_nodes.get(uuid);
        if (null == viewParams) {
          viewParams = new Defines_1.ViewParams();
          viewParams.uuid = this.getUuid(prefabPath);
          viewParams.prefabPath = prefabPath;
          viewParams.params = params || {};
          viewParams.callbacks = callbacks || {};
          var onRemove_Source = viewParams.callbacks.onRemoved;
          viewParams.callbacks.onRemoved = function(node, params) {
            onRemove_Source && onRemove_Source(node, params);
            setTimeout(function() {
              self.next();
            }, 0);
          };
          viewParams.valid = true;
          this.ui_nodes.set(viewParams.uuid, viewParams);
        }
        if (this.current && this.current.valid) this.queue.push(viewParams); else {
          this.current = viewParams;
          config.AssetBundle ? ResLoader_1.resLoader.loadDir(config.AssetBundle, "/", function() {
            "string" === typeof config.bundle ? this.load(viewParams, config.bundle) : this.load(viewParams);
          }.bind(this)) : "string" === typeof config.bundle ? this.load(viewParams, config.bundle) : this.load(viewParams);
        }
        return uuid;
      };
      LayerDialog.prototype.next = function() {
        if (this.queue.length > 0) {
          this.current = this.queue.shift();
          this.current.node ? this.createNode(null, this.current) : this.load(this.current);
        }
      };
      return LayerDialog;
    }(LayerPopup_1.LayerPopUp);
    exports.LayerDialog = LayerDialog;
    cc._RF.pop();
  }, {
    "../../common/loader/ResLoader": "ResLoader",
    "./Defines": "Defines",
    "./LayerPopup": "LayerPopup"
  } ],
  LayerManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7a3b24JDb5PzKWfJu8HX4xu", "LayerManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerManager = exports.LayerType = void 0;
    var ResLoader_1 = require("../../common/loader/ResLoader");
    var GUI_1 = require("../GUI");
    var DelegateComponent_1 = require("./DelegateComponent");
    var LayerDialog_1 = require("./LayerDialog");
    var LayerNotify_1 = require("./LayerNotify");
    var LayerPopup_1 = require("./LayerPopup");
    var LayerUI_1 = require("./LayerUI");
    var UIMap_1 = require("./UIMap");
    var LayerType;
    (function(LayerType) {
      LayerType["background"] = "LayerBackGround";
      LayerType["Game"] = "LayerGame";
      LayerType["UI"] = "LayerUI";
      LayerType["PopUp"] = "LayerPopUp";
      LayerType["Dialog"] = "LayerDialog";
      LayerType["Alert"] = "LayerAlert";
      LayerType["Notify"] = "LayerNotify";
      LayerType["Guide"] = "LayerGuide";
    })(LayerType = exports.LayerType || (exports.LayerType = {}));
    var LayerManager = function() {
      function LayerManager(root) {
        this.configs = {};
      }
      Object.defineProperty(LayerManager.prototype, "portrait", {
        get: function() {
          return this.root.getComponent(GUI_1.GUI).portrait;
        },
        enumerable: false,
        configurable: true
      });
      LayerManager.prototype.init = function(configs) {
        this.configs = configs;
      };
      LayerManager.prototype.toast = function(content, useI18n, time) {
        void 0 === useI18n && (useI18n = false);
        void 0 === time && (time = 1);
        this.notify && this.notify.show(content, useI18n, time);
      };
      LayerManager.prototype.setConfig = function(uiId, config) {
        this.configs[uiId] = config;
      };
      Object.defineProperty(LayerManager.prototype, "ScreenWidth", {
        get: function() {
          return this.root.getComponent(GUI_1.GUI).transform.width;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(LayerManager.prototype, "ScreenHeight", {
        get: function() {
          return this.root.getComponent(GUI_1.GUI).transform.height;
        },
        enumerable: false,
        configurable: true
      });
      LayerManager.prototype.setUIMap = function(data) {
        null == this.uiMap && (this.uiMap = new UIMap_1.UIMap());
        this.uiMap.init(this, data);
      };
      LayerManager.prototype.openOfParent = function(uiId, parent, callback) {
        void 0 === callback && (callback = null);
        var config = this.configs[uiId];
        null != config && ResLoader_1.resLoader.load(config.bundle, config.prefab, function(err, res) {
          if (err) {
            console.log(err);
            return;
          }
          var newnode = cc.instantiate(res);
          newnode.parent = parent;
          callback && callback(newnode);
        });
      };
      LayerManager.prototype.closeOfParent = function(uiId, parent, callback) {
        void 0 === callback && (callback = null);
        var config = this.configs[uiId];
        if (null != config) {
          var ui = parent.getChildByName(config.prefab);
          ui && ui.destroy();
          callback();
        }
      };
      LayerManager.prototype.open = function(uiId, uiArgs, callbacks) {
        void 0 === uiArgs && (uiArgs = null);
        var config = this.configs[uiId];
        console.log("\u6253\u5f00\u6e38\u620f\u754c\u9762" + uiId);
        if (null == config) {
          cc.warn("\u6253\u5f00\u7f16\u53f7\u4e3a\u3010" + uiId + "\u3011\u7684\u754c\u9762\u5931\u8d25\uff0c\u914d\u7f6e\u4fe1\u606f\u4e0d\u5b58\u5728");
          return;
        }
        var Uiid = "";
        switch (config.layer) {
         case LayerType.UI:
          Uiid = this.ui.add(config, uiArgs, callbacks);
          break;

         case LayerType.PopUp:
          Uiid = this.popup.add(config, uiArgs, callbacks);
          break;

         case LayerType.Dialog:
          Uiid = this.dialog.add(config, uiArgs, callbacks);
          break;

         case LayerType.Alert:
          Uiid = this.alert.add(config, uiArgs, callbacks);
          break;

         case LayerType.Guide:
          Uiid = this.guide.add(config, uiArgs, callbacks);
          break;

         case LayerType.Notify:
          Uiid = this.notify.add(config, uiArgs, callbacks);
        }
        return Uiid;
      };
      LayerManager.prototype.has = function(uiId) {
        var config = this.configs[uiId];
        if (null == config) {
          cc.warn("\u7f16\u53f7\u4e3a\u3010" + uiId + "\u3011\u7684\u754c\u9762\u5931\u8d25\uff0c\u914d\u7f6e\u4fe1\u606f\u4e0d\u5b58\u5728");
          return;
        }
        var result = false;
        switch (config.layer) {
         case LayerType.UI:
          result = this.ui.has(config.prefab);
          break;

         case LayerType.PopUp:
          result = this.popup.has(config.prefab);
          break;

         case LayerType.Dialog:
          result = this.dialog.has(config.prefab);
          break;

         case LayerType.Alert:
          result = this.alert.has(config.prefab);
          break;

         case LayerType.Guide:
          result = this.guide.has(config.prefab);
          break;

         case LayerType.Notify:
          result = this.alert.has(config.prefab);
        }
        return result;
      };
      LayerManager.prototype.remove = function(uiId, isDestroy) {
        void 0 === isDestroy && (isDestroy = true);
        var config = this.configs[uiId];
        console.log("\u5173\u95ed\u52a0\u8f7d\u754c\u9762==================" + uiId);
        if (null == config) {
          cc.warn("\u5220\u9664\u7f16\u53f7\u4e3a\u3010" + uiId + "\u3011\u7684\u754c\u9762\u5931\u8d25\uff0c\u914d\u7f6e\u4fe1\u606f\u4e0d\u5b58\u5728");
          return;
        }
        switch (config.layer) {
         case LayerType.UI:
          this.ui.remove(config.prefab, isDestroy);
          break;

         case LayerType.PopUp:
          this.popup.remove(config.prefab, isDestroy);
          break;

         case LayerType.Dialog:
          this.dialog.remove(config.prefab, isDestroy);
          break;

         case LayerType.Alert:
          this.alert.remove(config.prefab, isDestroy);
          break;

         case LayerType.Guide:
          this.guide.remove(config.prefab, isDestroy);
          break;

         case LayerType.Notify:
          this.notify.remove(config.prefab, isDestroy);
        }
      };
      LayerManager.prototype.removeByNode = function(node, isDestroy) {
        void 0 === isDestroy && (isDestroy = false);
        if (node instanceof cc.Node) {
          var comp = node.getComponent(DelegateComponent_1.DelegateComponent);
          if (comp && comp.viewParams) node.parent.removeByUuid(comp.viewParams.uuid, isDestroy); else {
            cc.warn("\u5f53\u524d\u5220\u9664\u7684node\u4e0d\u662f\u901a\u8fc7\u754c\u9762\u7ba1\u7406\u5668\u6dfb\u52a0\u5230\u821e\u53f0\u4e0a");
            node.destroy();
          }
          return;
        }
      };
      LayerManager.prototype.clear = function(isDestroy) {
        void 0 === isDestroy && (isDestroy = false);
        this.ui.clearAll(isDestroy);
        this.popup.clearAll(isDestroy);
        this.dialog.clearAll(isDestroy);
        this.alert.clearAll(isDestroy);
      };
      LayerManager.prototype.initNode = function(root) {
        this.root = root;
        this.camera = this.root.getComponentInChildren(cc.Camera);
        this.background = new cc.Node(LayerType.background);
        this.game = new cc.Node(LayerType.Game);
        this.fishPool = new cc.Node("FishPool");
        var wid = this.fishPool.addComponent(cc.Widget);
        wid.isAlignLeft = wid.isAlignRight = wid.isAlignTop = wid.isAlignBottom = true;
        wid.left = wid.right = wid.top = wid.bottom = 0;
        wid.enabled = true;
        var widget = this.game.addComponent(cc.Widget);
        widget.isAlignLeft = widget.isAlignRight = widget.isAlignTop = widget.isAlignBottom = true;
        widget.left = widget.right = widget.top = widget.bottom = 0;
        widget.enabled = true;
        this.ui = new LayerUI_1.LayerUI(LayerType.UI);
        this.popup = new LayerPopup_1.LayerPopUp(LayerType.PopUp);
        this.dialog = new LayerDialog_1.LayerDialog(LayerType.Dialog);
        this.alert = new LayerDialog_1.LayerDialog(LayerType.Alert);
        this.notify = new LayerNotify_1.LayerNotify(LayerType.Notify);
        this.guide = new LayerUI_1.LayerUI(LayerType.Guide);
        root.addChild(this.background);
        root.addChild(this.ui);
        root.addChild(this.game);
        root.addChild(this.popup);
        root.addChild(this.dialog);
        root.addChild(this.alert);
        root.addChild(this.notify);
        root.addChild(this.guide);
        root.addChild(this.fishPool);
        console.log("\u8fdb\u5165InitNode");
      };
      return LayerManager;
    }();
    exports.LayerManager = LayerManager;
    cc._RF.pop();
  }, {
    "../../common/loader/ResLoader": "ResLoader",
    "../GUI": "GUI",
    "./DelegateComponent": "DelegateComponent",
    "./LayerDialog": "LayerDialog",
    "./LayerNotify": "LayerNotify",
    "./LayerPopup": "LayerPopup",
    "./LayerUI": "LayerUI",
    "./UIMap": "UIMap"
  } ],
  LayerMap: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "e4eb9c9GgBNKqceguIzZDEn", "LayerMap");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerMap = void 0;
    var LayerUI_1 = require("./LayerUI");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var LayerMap = function(_super) {
      __extends(LayerMap, _super);
      function LayerMap(name) {
        var _this = _super.call(this, name) || this;
        _this.init();
        return _this;
      }
      LayerMap.prototype.init = function() {
        this.black = this.addComponent(cc.BlockInputEvents);
        this.black.enabled = false;
      };
      LayerMap.prototype.add = function(config, params, popParams) {
        this.black.enabled = true;
        return _super.prototype.add.call(this, config, params, popParams);
      };
      LayerMap.prototype.remove = function(prefabPath, isDestroy) {
        _super.prototype.remove.call(this, prefabPath, isDestroy);
        this.black.enabled = false;
      };
      LayerMap.prototype.removeByUuid = function(prefabPath, isDestroy) {
        _super.prototype.removeByUuid.call(this, prefabPath, isDestroy);
        this.black.enabled = false;
      };
      LayerMap.prototype.clearAll = function(isDestroy) {
        _super.prototype.clearAll.call(this, isDestroy);
        this.black.enabled = false;
        this.active = false;
      };
      return LayerMap;
    }(LayerUI_1.LayerUI);
    exports.LayerMap = LayerMap;
    cc._RF.pop();
  }, {
    "./LayerUI": "LayerUI"
  } ],
  LayerNotify: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "23e74QbwnVPxbZfx88JKM4p", "LayerNotify");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerNotify = void 0;
    var ResLoader_1 = require("../../common/loader/ResLoader");
    var Defines_1 = require("./Defines");
    var DelegateComponent_1 = require("./DelegateComponent");
    var LayerUI_1 = require("./LayerUI");
    var NotifyComponent_1 = require("./NotifyComponent");
    var ToastPrefabPath = "notify";
    var ToastPrefabBundle = "common";
    var LayerNotify = function(_super) {
      __extends(LayerNotify, _super);
      function LayerNotify() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.queue = new Array();
        return _this;
      }
      LayerNotify.prototype.show = function(content, useI18n, time) {
        var _this = this;
        var viewParams = new Defines_1.ViewParams();
        viewParams.uuid = this.getUuid(ToastPrefabPath);
        viewParams.prefabPath = ToastPrefabPath;
        viewParams.params = {
          content: content,
          useI18n: useI18n
        };
        viewParams.callbacks = {};
        viewParams.valid = true;
        var onAdded_Source = viewParams.callbacks.onAdded;
        viewParams.callbacks.onAdded = function(node, params) {
          onAdded_Source && onAdded_Source(node, params);
          setTimeout(function() {
            _this.next();
          }, 300);
        };
        this.ui_nodes.set(viewParams.uuid, viewParams);
        if (this.current && this.current.view.valid) this.queue.push({
          view: viewParams,
          time: time
        }); else {
          this.current = {
            view: viewParams,
            time: time
          };
          this.load({
            view: viewParams,
            time: time
          }, ToastPrefabBundle);
        }
      };
      LayerNotify.prototype.load = function(data, bundle) {
        var _this = this;
        var viewParams = data;
        data.view && (viewParams = data.view);
        ResLoader_1.resLoader.load(bundle, viewParams.prefabPath, function(err, res) {
          err && cc.error(err);
          var childNode = cc.instantiate(res);
          viewParams.node = childNode;
          var comp = childNode.addComponent(DelegateComponent_1.DelegateComponent);
          comp.viewParams = viewParams;
          _this.createNode1(res, viewParams, data.time);
        });
      };
      LayerNotify.prototype.createNode1 = function(prefab, viewParams, time) {
        var childNode = _super.prototype.createNode.call(this, prefab, viewParams);
        var toastCom = childNode.getComponent(NotifyComponent_1.NotifyComponent);
        childNode.active = true;
        toastCom.toast(viewParams.params.content, time, viewParams.params.useI18n);
        return childNode;
      };
      LayerNotify.prototype.createNode = function(prefab, viewParams) {
        var childNode = _super.prototype.createNode.call(this, prefab, viewParams);
        var toastCom = childNode.getComponent(NotifyComponent_1.NotifyComponent);
        childNode.active = true;
        toastCom.toast(viewParams.params.content, viewParams.params.useI18n);
        return childNode;
      };
      LayerNotify.prototype.next = function() {
        if (this.queue.length > 0) {
          this.current = this.queue.shift();
          this.load(this.current, ToastPrefabBundle);
        } else this.current = null;
      };
      return LayerNotify;
    }(LayerUI_1.LayerUI);
    exports.LayerNotify = LayerNotify;
    cc._RF.pop();
  }, {
    "../../common/loader/ResLoader": "ResLoader",
    "./Defines": "Defines",
    "./DelegateComponent": "DelegateComponent",
    "./LayerUI": "LayerUI",
    "./NotifyComponent": "NotifyComponent"
  } ],
  LayerPopup: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "06323wlOchJ7qovoQsVlr+/", "LayerPopup");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerPopUp = void 0;
    var LayerUI_1 = require("./LayerUI");
    var LayerPopUp = function(_super) {
      __extends(LayerPopUp, _super);
      function LayerPopUp(name) {
        var _this = _super.call(this, name) || this;
        _this.init();
        return _this;
      }
      LayerPopUp.prototype.init = function() {
        this.black = this.addComponent(cc.BlockInputEvents);
        this.black.enabled = false;
      };
      LayerPopUp.prototype.add = function(config, params, popParams) {
        this.black.enabled = true;
        return _super.prototype.add.call(this, config, params, popParams);
      };
      LayerPopUp.prototype.remove = function(prefabPath, isDestroy) {
        _super.prototype.remove.call(this, prefabPath, isDestroy);
        this.black.enabled = false;
      };
      LayerPopUp.prototype.removeByUuid = function(prefabPath, isDestroy) {
        _super.prototype.removeByUuid.call(this, prefabPath, isDestroy);
        this.black.enabled = false;
      };
      LayerPopUp.prototype.clearAll = function(isDestroy) {
        _super.prototype.clearAll.call(this, isDestroy);
        this.black.enabled = false;
        this.active = false;
      };
      return LayerPopUp;
    }(LayerUI_1.LayerUI);
    exports.LayerPopUp = LayerPopUp;
    cc._RF.pop();
  }, {
    "./LayerUI": "LayerUI"
  } ],
  LayerUI: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ef3dao1TdlHY6rQfvnwVt9Y", "LayerUI");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerUI = void 0;
    var ResLoader_1 = require("../../common/loader/ResLoader");
    var Defines_1 = require("./Defines");
    var DelegateComponent_1 = require("./DelegateComponent");
    var LayerUI = function(_super) {
      __extends(LayerUI, _super);
      function LayerUI(name) {
        var _this = _super.call(this, name) || this;
        _this.ui_nodes = new Map();
        var widget = _this.addComponent(cc.Widget);
        widget.isAlignLeft = widget.isAlignRight = widget.isAlignTop = widget.isAlignBottom = true;
        widget.left = widget.right = widget.top = widget.bottom = 0;
        widget.alignMode = 2;
        widget.enabled = true;
        return _this;
      }
      LayerUI.prototype.getUuid = function(prefabPath) {
        var uuid = this.name + "_" + prefabPath;
        return uuid.replace(/\//g, "_");
      };
      LayerUI.prototype.add = function(config, params, callbacks) {
        var prefabPath = config.prefab;
        var uuid = this.getUuid(prefabPath);
        var viewParams = this.ui_nodes.get(uuid);
        if (viewParams && viewParams.valid) {
          cc.warn("\u8def\u5f84\u4e3a\u3010" + prefabPath + "\u3011\u7684\u9884\u5236\u91cd\u590d\u52a0\u8f7d");
          return "";
        }
        if (null == viewParams) {
          viewParams = new Defines_1.ViewParams();
          viewParams.uuid = uuid;
          viewParams.prefabPath = prefabPath;
          viewParams.params = params || {};
          viewParams.callbacks = callbacks || {};
          viewParams.valid = true;
          this.ui_nodes.set(viewParams.uuid, viewParams);
        }
        config.AssetBundle ? ResLoader_1.resLoader.loadDir(config.bundle, config.AssetBundle, null, function() {
          "string" === typeof config.bundle ? this.load(viewParams, config.bundle) : this.load(viewParams);
        }.bind(this)) : "string" === typeof config.bundle ? this.load(viewParams, config.bundle) : this.load(viewParams);
        return uuid;
      };
      LayerUI.prototype.load = function(viewParams, bundle) {
        var self = this;
        var vp = this.ui_nodes.get(viewParams.uuid);
        if (vp && vp.node) this.createNode(null, vp); else {
          var loadprefab = function(err, res) {
            if (err) {
              cc.error(err);
              return;
            }
            var childNode = cc.instantiate(res);
            viewParams.node = childNode;
            var comp = childNode.addComponent(DelegateComponent_1.DelegateComponent);
            comp.viewParams = viewParams;
            self.createNode(res, viewParams);
          };
          "string" === typeof bundle ? ResLoader_1.resLoader.load(bundle, viewParams.prefabPath, cc.Prefab, loadprefab) : ResLoader_1.resLoader.load(viewParams.prefabPath, cc.Prefab, loadprefab);
        }
      };
      LayerUI.prototype.createNode = function(prefab, viewParams) {
        viewParams.valid = true;
        var childNode = viewParams.node;
        var comp = childNode.getComponent(DelegateComponent_1.DelegateComponent);
        childNode.parent = this;
        comp.add();
        return childNode;
      };
      LayerUI.prototype.removeByUuid = function(uuid, isDestroy) {
        var viewParams = this.ui_nodes.get(uuid);
        if (viewParams) {
          isDestroy && this.ui_nodes.delete(viewParams.uuid);
          var childNode = viewParams.node;
          var comp = null === childNode || void 0 === childNode ? void 0 : childNode.getComponent(DelegateComponent_1.DelegateComponent);
          comp.remove(isDestroy);
        }
      };
      LayerUI.prototype.remove = function(prefabPath, isDestroy) {
        var children = this.__nodes();
        for (var i = 0; i < children.length; i++) {
          var viewParams = children[i].viewParams;
          if (viewParams.prefabPath === prefabPath) {
            isDestroy, this.ui_nodes.delete(viewParams.uuid);
            children[i].remove(isDestroy);
            viewParams.valid = false;
          }
        }
      };
      LayerUI.prototype.getByUuid = function(uuid) {
        var children = this.__nodes();
        for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
          var comp = children_1[_i];
          if (comp.viewParams && comp.viewParams.uuid === uuid) return comp.node;
        }
        return null;
      };
      LayerUI.prototype.get = function(prefabPath) {
        var arr = [];
        var children = this.__nodes();
        for (var _i = 0, children_2 = children; _i < children_2.length; _i++) {
          var comp = children_2[_i];
          comp.viewParams.prefabPath === prefabPath && arr.push(comp.node);
        }
        return arr;
      };
      LayerUI.prototype.has = function(prefabPathOrUUID) {
        var children = this.__nodes();
        for (var _i = 0, children_3 = children; _i < children_3.length; _i++) {
          var comp = children_3[_i];
          if (comp.viewParams.uuid === prefabPathOrUUID || comp.viewParams.prefabPath === prefabPathOrUUID) return true;
        }
        return false;
      };
      LayerUI.prototype.find = function(prefabPathReg) {
        var arr = [];
        var children = this.__nodes();
        for (var _i = 0, children_4 = children; _i < children_4.length; _i++) {
          var comp = children_4[_i];
          prefabPathReg.test(comp.viewParams.prefabPath) && arr.push(comp.node);
        }
        return arr;
      };
      LayerUI.prototype.__nodes = function() {
        var result = [];
        var children = this.children;
        for (var i = 0; i < children.length; i++) {
          var comp = children[i].getComponent(DelegateComponent_1.DelegateComponent);
          comp && comp.viewParams && comp.viewParams.valid && cc.isValid(comp) && result.push(comp);
        }
        return result;
      };
      LayerUI.prototype.size = function() {
        return this.children.length;
      };
      LayerUI.prototype.clearAll = function(isDestroy) {
        var _this = this;
        this.ui_nodes.forEach(function(value, key) {
          _this.removeByUuid(value.uuid, isDestroy);
          value.valid = false;
        });
        this.ui_nodes.clear();
      };
      return LayerUI;
    }(cc.Node);
    exports.LayerUI = LayerUI;
    cc._RF.pop();
  }, {
    "../../common/loader/ResLoader": "ResLoader",
    "./Defines": "Defines",
    "./DelegateComponent": "DelegateComponent"
  } ],
  LayerUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "31bb0sp3LVAmqOIaKrNOqwZ", "LayerUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LayerUtil = exports.LayerItem = void 0;
    var LayerItem = function() {
      function LayerItem(value, name) {
        this._value = value;
        this._name = name;
      }
      Object.defineProperty(LayerItem.prototype, "value", {
        get: function() {
          return this._value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(LayerItem.prototype, "name", {
        get: function() {
          return this._name;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(LayerItem.prototype, "mask", {
        get: function() {
          return 1 << this._value;
        },
        enumerable: false,
        configurable: true
      });
      return LayerItem;
    }();
    exports.LayerItem = LayerItem;
    var LayerUtil = function() {
      function LayerUtil() {}
      LayerUtil.setNodeLayer = function(item, node) {
        node.layer = item.mask;
        node.children.forEach(function(n) {
          n.layer = item.mask;
          LayerUtil.setNodeLayer(item, n);
        });
      };
      LayerUtil.MAP = new LayerItem(0, "MAP");
      LayerUtil.AVATAR = new LayerItem(1, "AVATAR");
      LayerUtil.IGNORE_RAYCAST = new LayerItem(20, "IGNORE_RAYCAST");
      LayerUtil.GIZMOS = new LayerItem(21, "GIZMOS");
      LayerUtil.CC_EDITOR = new LayerItem(22, "CC_EDITOR");
      LayerUtil.UI_3D = new LayerItem(23, "UI_3D");
      LayerUtil.SCENE_GIZMO = new LayerItem(24, "SCENE_GIZMO");
      LayerUtil.UI_2D = new LayerItem(25, "UI_2D");
      LayerUtil.PROFILTER = new LayerItem(28, "PROFILTER");
      LayerUtil.DEFAULT = new LayerItem(30, "DEFAULT");
      return LayerUtil;
    }();
    exports.LayerUtil = LayerUtil;
    cc._RF.pop();
  }, {} ],
  LoadingBar: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ec525TsMfpCuJBeOz1xGww5", "LoadingBar");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var LoadingBar = function(_super) {
      __extends(LoadingBar, _super);
      function LoadingBar() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.proGressBar = null;
        return _this;
      }
      LoadingBar.prototype.ProGressShowFun = function(ProValue) {
        this.proGressBar.progress = ProValue;
      };
      __decorate([ property(cc.ProgressBar) ], LoadingBar.prototype, "proGressBar", void 0);
      LoadingBar = __decorate([ ccclass ], LoadingBar);
      return LoadingBar;
    }(cc.Component);
    exports.default = LoadingBar;
    cc._RF.pop();
  }, {} ],
  LoadingViewComp: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7f0camt1I1PrZeqjczfiHzK", "LoadingViewComp");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    var __generator = this && this.__generator || function(thisArg, body) {
      var _ = {
        label: 0,
        sent: function() {
          if (1 & t[0]) throw t[1];
          return t[1];
        },
        trys: [],
        ops: []
      }, f, y, t, g;
      return g = {
        next: verb(0),
        throw: verb(1),
        return: verb(2)
      }, "function" === typeof Symbol && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([ n, v ]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 
          0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          (y = 0, t) && (op = [ 2 & op[0], t.value ]);
          switch (op[0]) {
           case 0:
           case 1:
            t = op;
            break;

           case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

           case 5:
            _.label++;
            y = op[1];
            op = [ 0 ];
            continue;

           case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;

           default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (6 === op[0] || 2 === op[0])) {
              _ = 0;
              continue;
            }
            if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (6 === op[0] && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            t[2] && _.ops.pop();
            _.trys.pop();
            continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [ 6, e ];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (5 & op[0]) throw op[1];
        return {
          value: op[0] ? op[1] : void 0,
          done: true
        };
      }
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.LoadingViewComp = void 0;
    var Account_1 = require("../../game/account/Account");
    var GameEvent_1 = require("../../game/common/config/GameEvent");
    var GameUIConfig_1 = require("../../game/common/config/GameUIConfig");
    var SingletonModuleComp_1 = require("../../game/SingletonModuleComp");
    var MessageManager_1 = require("../common/event/MessageManager");
    var ResLoader_1 = require("../common/loader/ResLoader");
    var Engine_1 = require("../Engine");
    var VMParent_1 = require("../libs/model-view/VMParent");
    var Root_1 = require("../Root");
    var JsonUtil_1 = require("../utils/JsonUtil");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var LoadingViewComp = function(_super) {
      __extends(LoadingViewComp, _super);
      function LoadingViewComp() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.data = {
          currProgress: 0,
          totalProgress: 0,
          progress: "",
          prompt: ""
        };
        _this.text = null;
        _this.progress = null;
        _this.prompt = null;
        _this.bol = false;
        return _this;
      }
      LoadingViewComp.prototype.reset = function() {
        Engine_1.engine.RootNode.getComponent(Root_1.Root).OtherNode.destroy();
      };
      LoadingViewComp.prototype.start = function() {
        console.log("\u6e38\u620f\u52a0\u8f7d\u8fdb\u5ea6LoadingViewComp");
        this.addEvent();
        this.loadRes();
      };
      LoadingViewComp.prototype.addEvent = function() {
        MessageManager_1.Message.on(GameEvent_1.GameEvent.RequsetDataComplete, this.onHandler, this);
      };
      LoadingViewComp.prototype.onHandler = function(event, args) {
        switch (event) {
         case GameEvent_1.GameEvent.RequsetDataComplete:
          console.log("\u767b\u5f55\u6210\u529f=======================");
          MessageManager_1.Message.dispatchEvent("gamestart");
        }
      };
      LoadingViewComp.prototype.loadRes = function() {
        return __awaiter(this, void 0, void 0, function() {
          var self, loadAsyncJson, loadGame;
          return __generator(this, function(_a) {
            self = this;
            self.progress.progress = 0;
            loadAsyncJson = self.loadLocalJson.bind(self);
            loadGame = self.loadGamePublic.bind(self);
            console.log("\u5f00\u59cb\u52a0\u8f7djson");
            loadAsyncJson(loadGame);
            return [ 2 ];
          });
        });
      };
      LoadingViewComp.prototype.loadjson = function(callback, jsonkeys, i) {
        void 0 === i && (i = -1);
        i++;
        i < jsonkeys.length ? JsonUtil_1.JsonUtil.loadAsyncTB("resources", JsonUtil_1.JsonConfig[jsonkeys[i]], this.loadjson(callback, jsonkeys, i)) : callback();
      };
      LoadingViewComp.prototype.loadLocalJson = function(callback) {
        var arr = [];
        for (var key in JsonUtil_1.JsonConfig) arr.push(key);
        this.loadjson(callback, arr);
      };
      LoadingViewComp.prototype.loadGamePublic = function() {
        var self = this;
        self.progress.progress = 0;
        self.text.string = "\u52a0\u8f7d\u672c\u5730\u8d44\u6e90";
        console.log("\u5f00\u59cb\u52a0\u8f7d\u8d44\u6e90================");
        var option = {
          onFileProgress: function(loaded, total) {
            var progress = loaded.totalBytesWritten / loaded.totalBytesExpectedToWrite;
            self.progress.progress = progress;
            self.prompt.string = (100 * progress).toFixed(2);
          }
        };
        cc.assetManager.loadBundle("resources", option, function(err, bundle) {
          ResLoader_1.resLoader.loadDir("resources", "/", self.onProgressCallback.bind(self), self.onCompleteCallback.bind(self));
        });
      };
      LoadingViewComp.prototype.loadGameFont = function() {
        var self = this;
        self.progress.progress = 0;
        self.text.string = "\u52a0\u8f7d\u5b57\u4f53\u8d44\u6e90";
        console.log("\u5f00\u59cb\u52a0\u8f7d\u8d44\u6e90================");
        var option = {
          onFileProgress: function(loaded, total) {
            var progress = loaded.totalBytesWritten / loaded.totalBytesExpectedToWrite;
            self.progress.progress = progress;
            self.prompt.string = (100 * progress).toFixed(2);
          }
        };
        cc.assetManager.loadBundle("font", option, function(err, bundle) {
          ResLoader_1.resLoader.loadDir("font", "/", self.onProgressCallback.bind(self), self.onCompleteCallback.bind(self));
        });
      };
      LoadingViewComp.prototype.loadGameMusic = function() {
        var self = this;
        self.progress.progress = 0;
        self.text.string = "\u52a0\u8f7d\u97f3\u4e50\u8d44\u6e90";
        console.log("\u5f00\u59cb\u52a0\u8f7d\u8d44\u6e90================");
        var option = {
          onFileProgress: function(loaded, total) {
            var progress = loaded.totalBytesWritten / loaded.totalBytesExpectedToWrite;
            self.progress.progress = progress;
            self.prompt.string = (100 * progress).toFixed(2);
          }
        };
        cc.assetManager.loadBundle("music", option, function(err, bundle) {
          ResLoader_1.resLoader.loadDir("music", "/", self.onProgressCallback.bind(self), self.loadGameFont.bind(self));
        });
      };
      LoadingViewComp.prototype.loadSceneResources = function() {
        var self = this;
        self.progress.progress = 0;
        self.text.string = "\u52a0\u8f7d\u754c\u9762\u8d44\u6e90";
        console.log("\u5f00\u59cb\u52a0\u8f7d\u8d44\u6e90================");
        var option = {
          onFileProgress: function(loaded, total) {
            var progress = loaded.totalBytesWritten / loaded.totalBytesExpectedToWrite;
            self.progress.progress = progress;
            self.prompt.string = (100 * progress).toFixed(2);
          }
        };
        cc.assetManager.loadBundle("scene", option, function(err, bundle) {
          ResLoader_1.resLoader.loadDir("scene", "/", self.onProgressCallback.bind(self), self.onCompleteCallback.bind(self));
        });
      };
      LoadingViewComp.prototype.onProgressCallback = function(finished, total, item) {
        var self = this;
        var Value = finished / total;
        if (finished > Value) {
          self.progress.progress = Value;
          self.prompt.string = (100 * self.progress.progress).toFixed(2) + "%";
        }
      };
      LoadingViewComp.prototype.onCompleteCallback = function() {
        console.log("\u52a0\u8f7d\u8d44\u6e90\u5b8c\u6210================");
        SingletonModuleComp_1.SingletonModule.account = new Account_1.default();
        SingletonModuleComp_1.SingletonModule.account.init(function() {
          console.log("\u5207\u6362\u573a\u666f");
          MessageManager_1.Message.dispatchEvent("gamestart");
        });
        console.log("\u8d26\u53f7\u521d\u59cb\u5316\u52a0\u8f7d\u9884\u8bbeRecord++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
        Engine_1.engine.gui.closeOfParent(GameUIConfig_1.UIID.Loading, Engine_1.engine.RootNode.getComponent(Root_1.Root).OtherNode, function() {});
        console.log("\u6210\u529f\u521d\u59cb\u5316Record=============================================================");
      };
      __decorate([ property(cc.Label) ], LoadingViewComp.prototype, "text", void 0);
      __decorate([ property(cc.ProgressBar) ], LoadingViewComp.prototype, "progress", void 0);
      __decorate([ property(cc.Label) ], LoadingViewComp.prototype, "prompt", void 0);
      LoadingViewComp = __decorate([ ccclass("LoadingViewComp") ], LoadingViewComp);
      return LoadingViewComp;
    }(VMParent_1.default);
    exports.LoadingViewComp = LoadingViewComp;
    cc._RF.pop();
  }, {
    "../../game/SingletonModuleComp": "SingletonModuleComp",
    "../../game/account/Account": "Account",
    "../../game/common/config/GameEvent": "GameEvent",
    "../../game/common/config/GameUIConfig": "GameUIConfig",
    "../Engine": "Engine",
    "../Root": "Root",
    "../common/event/MessageManager": "MessageManager",
    "../common/loader/ResLoader": "ResLoader",
    "../libs/model-view/VMParent": "VMParent",
    "../utils/JsonUtil": "JsonUtil"
  } ],
  Loadingindicator: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3680f9DIKBPdaqTF2UeD6JV", "Loadingindicator");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var LoadingIndicator = function(_super) {
      __extends(LoadingIndicator, _super);
      function LoadingIndicator() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.loading = null;
        _this.loading_rotate = 0;
        return _this;
      }
      LoadingIndicator.prototype.update = function(dt) {
        this.loading_rotate += 220 * dt;
        this.loading_rotate > 360 && (this.loading_rotate -= 360);
      };
      __decorate([ property(cc.Node) ], LoadingIndicator.prototype, "loading", void 0);
      LoadingIndicator = __decorate([ ccclass, menu("ui/prompt/LoadingIndicator") ], LoadingIndicator);
      return LoadingIndicator;
    }(cc.Component);
    exports.default = LoadingIndicator;
    cc._RF.pop();
  }, {} ],
  Logger: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4de42HK8blFuIQE/JwfBOsq", "Logger");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Logger = void 0;
    var Logger;
    (function(Logger) {
      var tags = new Map();
      var Key;
      (function(Key) {
        Key["Net"] = "Net";
        Key["Model"] = "Model";
        Key["Business"] = "Business";
        Key["View"] = "View";
        Key["Config"] = "Config";
        Key["Trace"] = "Trace";
        Key["PlatformInterface"] = "PlatformInterface";
      })(Key || (Key = {}));
      function init() {
        register(Key.Net);
        register(Key.Model);
        register(Key.Business);
        register(Key.View);
        register(Key.Config);
        register(Key.Trace);
        register(Key.PlatformInterface);
      }
      Logger.init = init;
      function start() {
        console.time("Time");
      }
      Logger.start = start;
      function end() {
        console.timeEnd("Time");
      }
      Logger.end = end;
      function table(msg, describe) {
        if (!tags.has(Key.Trace)) return;
        console.table(msg);
      }
      Logger.table = table;
      function trace(msg, describe) {
        print(Key.Trace, msg, "", describe);
      }
      Logger.trace = trace;
      function logInterface(msg, describe) {
        green(Key.PlatformInterface, msg, describe);
      }
      Logger.logInterface = logInterface;
      function logNet(msg, describe) {
        orange(Key.Net, msg, describe);
      }
      Logger.logNet = logNet;
      function logModel(msg, describe) {
        violet(Key.Model, msg, describe);
      }
      Logger.logModel = logModel;
      function logBusiness(msg, describe) {
        blue(Key.Business, msg, describe);
      }
      Logger.logBusiness = logBusiness;
      function logView(msg, describe) {
        green(Key.View, msg, describe);
      }
      Logger.logView = logView;
      function logConfig(msg, describe) {
        gray(Key.Config, msg, describe);
      }
      Logger.logConfig = logConfig;
      function erroring(msg) {
        cc.error("[ERROR]" + msg);
      }
      Logger.erroring = erroring;
      function warning(msg) {
        cc.warn("[WARN]:" + msg);
      }
      Logger.warning = warning;
      function orange(tag, msg, describe) {
        print(tag, msg, "color:#ee7700;", describe);
      }
      function violet(tag, msg, describe) {
        print(tag, msg, "color:Violet;", describe);
      }
      function blue(tag, msg, describe) {
        print(tag, msg, "color:#3a5fcd;", describe);
      }
      function green(tag, msg, describe) {
        print(tag, msg, "color:green;", describe);
      }
      function gray(tag, msg, describe) {
        print(tag, msg, "color:gray;", describe);
      }
      function register(tag) {
        tags.has(tag) || tags.set(tag, true);
      }
      function print(tag, msg, color, describe) {
        if (!tags.has(tag)) return;
        var backLog = console.log || cc.log;
        describe ? backLog.call(null, "%c%s%s%s:%s%o", color, getDateString(), "[" + tag + "]", stack(5), describe, msg) : backLog.call(null, "%c%s%s%s:%o", color, getDateString(), "[" + tag + "]", stack(5), msg);
      }
      function stack(index) {
        var e = new Error();
        var lines = e.stack.split("\n");
        var result = [];
        lines.forEach(function(line) {
          var _a;
          line = line.substring(7);
          var lineBreak = line.split(" ");
          lineBreak.length < 2 ? result.push(lineBreak[0]) : result.push((_a = {}, _a[lineBreak[0]] = lineBreak[1], 
          _a));
        });
        var list = [];
        var splitList = [];
        if (index < result.length - 1) {
          var value;
          for (var a in result[index]) {
            var splitList = a.split(".");
            if (2 == splitList.length) list = splitList.concat(); else {
              value = result[index][a];
              var start = value.lastIndexOf("/");
              var end = value.lastIndexOf(".");
              if (start > -1 && end > -1) {
                var r = value.substring(start + 1, end);
                list.push(r);
              } else list.push(value);
            }
          }
        }
        if (1 == list.length) return "[" + list[0] + ".ts]";
        if (2 == list.length) return "[" + list[0] + ".ts->" + list[1] + "]";
        return "";
      }
      function getDateString() {
        var d = new Date();
        var str = d.getHours().toString();
        var timeStr = "";
        timeStr += (1 == str.length ? "0" + str : str) + ":";
        str = d.getMinutes().toString();
        timeStr += (1 == str.length ? "0" + str : str) + ":";
        str = d.getSeconds().toString();
        timeStr += (1 == str.length ? "0" + str : str) + ":";
        str = d.getMilliseconds().toString();
        1 == str.length && (str = "00" + str);
        2 == str.length && (str = "0" + str);
        timeStr += str;
        timeStr = "[" + timeStr + "]";
        return timeStr;
      }
    })(Logger = exports.Logger || (exports.Logger = {}));
    Logger.init();
    cc._RF.pop();
  }, {} ],
  Login: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7d540sA4TVC8JVzdvxfuxwN", "Login");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Login = void 0;
    var GameEvent_1 = require("../../game/common/config/GameEvent");
    var MessageManager_1 = require("../common/event/MessageManager");
    var ResLoader_1 = require("../common/loader/ResLoader");
    var Engine_1 = require("../Engine");
    var Root_1 = require("../Root");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Login = function(_super) {
      __extends(Login, _super);
      function Login() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.loginButton = null;
        return _this;
      }
      Login.prototype.reset = function() {
        Engine_1.engine.RootNode.getComponent(Root_1.Root).gui.getChildByName("login").destroy();
        ResLoader_1.resLoader.releaseDir("fishfarm/modules/login/login");
      };
      Login.prototype.start = function() {
        MessageManager_1.Message.on("onclick", this.onclick, this);
        this.onclick(null);
      };
      Login.prototype.onDestroy = function() {
        MessageManager_1.Message.off("onclick", this.onclick, this);
      };
      Login.prototype.onclick = function(clickevent) {
        console.log("\u70b9\u51fb\u767b\u5f55\u6309\u94ae\u6210\u529f");
        if (Engine_1.engine.isEditor()) {
          MessageManager_1.Message.dispatchEvent(GameEvent_1.GameEvent.LoginSuccess);
          console.log("\u7f16\u8f91\u5668\u6a21\u5f0f\uff0c \u8fdb\u5165\u6e38\u620f");
        } else {
          console.log("\u8fdb\u5165else");
          MessageManager_1.Message.dispatchEvent(GameEvent_1.GameEvent.LoginSuccess);
          Engine_1.engine.platform.init();
          this.node.children[0].getComponent(cc.Button).interactable = false;
        }
      };
      __decorate([ property(cc.Node) ], Login.prototype, "loginButton", void 0);
      Login = __decorate([ ccclass("Login") ], Login);
      return Login;
    }(cc.Component);
    exports.Login = Login;
    cc._RF.pop();
  }, {
    "../../game/common/config/GameEvent": "GameEvent",
    "../Engine": "Engine",
    "../Root": "Root",
    "../common/event/MessageManager": "MessageManager",
    "../common/loader/ResLoader": "ResLoader"
  } ],
  LongHandGame: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "746811nkVBH/oacoWmZFQ/3", "LongHandGame");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var GraphicsSpriteMesh_1 = require("./GraphicsSpriteMesh");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var myColumn = function() {
      function myColumn(c, swp) {
        this.column = c;
        this.columnWorldPos = this.column.parent.convertToWorldSpaceAR(cc.v2(this.column.position.x, this.column.position.y));
        this.startWorldPos = swp;
        this.preTangentWorldPos = this.startWorldPos;
        this.rad = 0;
        this.cross = 0;
      }
      myColumn.prototype.toString = function() {
        return this.column.name + this.columnWorldPos + this.startWorldPos + "\n" + this.preTangentWorldPos + "\t" + this.rad;
      };
      return myColumn;
    }();
    var ropeScr_001 = function(_super) {
      __extends(ropeScr_001, _super);
      function ropeScr_001() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.PointArea = null;
        _this.ropeEnd = null;
        _this.lineWidth = 0;
        _this.target = null;
        _this.successPfb = null;
        _this.ctx = null;
        _this.spriteFrame = null;
        _this.oldSpriteFrame = null;
        _this.mouseWorldPos = cc.v2(0, 0);
        _this.columns = [];
        _this.success = false;
        return _this;
      }
      ropeScr_001.prototype.onLoad = function() {
        this.ctx.graphics.lineWidth = this.lineWidth;
        this.ctx.graphics.lineJoin = cc.Graphics.LineJoin.ROUND;
        this.ctx.graphics.lineCap = cc.Graphics.LineCap.ROUND;
        this.oldSpriteFrame = this.node.getComponentInChildren(cc.Sprite).spriteFrame;
        var rigs = this.node.parent.getComponentsInChildren(cc.RigidBody);
        for (var index = 0; index < rigs.length; index++) {
          var element = rigs[index];
          element.node.setPosition(cc.v2(element.node.position.x - element.node.parent.parent.position.x, element.node.position.y - element.node.parent.parent.position.y));
          console.log(element.node.getComponent(cc.PhysicsCircleCollider).offset);
        }
        this.PointArea.on("touchstart", this.touchstart, this);
        this.PointArea.on("touchmove", this.touchmove, this);
        this.PointArea.on("touchend", this.touchup, this);
        this.PointArea.on("touchcancel", this.touchup, this);
        cc.director.getPhysicsManager().enabled = true;
        var pos = this.node.parent.convertToWorldSpaceAR(cc.v2(this.node.position.x, this.node.position.y));
        pos = cc.Camera.main.node.convertToNodeSpaceAR(pos);
        this.columns.push(new myColumn(this.node, pos));
        this.flag = false;
      };
      ropeScr_001.prototype.touchstart = function(e) {
        this.flag = true;
        var pos = e.getLocation().add(cc.v2(0, 30));
        pos = cc.Camera.main.getCameraToWorldPoint(pos);
        this.mouseWorldPos = pos;
      };
      ropeScr_001.prototype.touchmove = function(e) {
        var pos = e.getLocation().add(cc.v2(0, 30));
        pos = cc.Camera.main.getCameraToWorldPoint(pos);
        this.mouseWorldPos = pos;
        this.target.getBoundingBoxToWorld().contains(pos) ? this.node.getComponent(GraphicsSpriteMesh_1.default).changeSpriteFrame(this.spriteFrame) : this.node.getComponent(GraphicsSpriteMesh_1.default).changeSpriteFrame(this.oldSpriteFrame);
      };
      ropeScr_001.prototype.touchup = function(e) {
        this.flag = false;
        if (this.target.getBoundingBoxToWorld().contains(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y)))) {
          this.ropeEnd.insertChild(this.target, 0);
          this.target.position = cc.v3();
        }
      };
      ropeScr_001.prototype.update = function() {
        this.ctx.clear();
        if (this.flag) this.ropeEnd.getComponent(cc.RigidBody).linearVelocity = this.mouseWorldPos.sub(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y))).mul(5); else if (this.ropeEnd.convertToNodeSpaceAR(this.columns[this.columns.length - 1].preTangentWorldPos).mag() < 20) if (this.columns.length > 1) this.columns.pop(); else {
          this.ropeEnd.getComponent(cc.RigidBody).linearVelocity = this.ropeEnd.convertToNodeSpaceAR(this.columns[this.columns.length - 1].preTangentWorldPos).mul(10);
          if (this.target.parent == this.ropeEnd && !this.success) {
            this.success = true;
            var succ = cc.instantiate(this.successPfb);
            succ.parent = this.node.parent;
          }
        } else this.ropeEnd.getComponent(cc.RigidBody).linearVelocity = this.ropeEnd.convertToNodeSpaceAR(this.columns[this.columns.length - 1].preTangentWorldPos).normalize().mul(1e3);
        var results = [];
        results = this.columns.length > 1 ? cc.director.getPhysicsManager().rayCast(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y)), this.columns[this.columns.length - 1].preTangentWorldPos, cc.RayCastType.Closest) : cc.director.getPhysicsManager().rayCast(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y)), this.columns[this.columns.length - 1].startWorldPos, cc.RayCastType.Closest);
        if (results.length >= 1) {
          var col = results[0].collider.node;
          if (cc.Vec2.distance(results[0].point, this.columns[this.columns.length - 1].preTangentWorldPos) > 1) {
            var sp = results[0].point;
            var nc = new myColumn(col, sp);
            this.columns.push(nc);
          } else this.checkColumnsPop();
        } else this.checkColumnsPop();
        this.ctx.graphics.moveTo(this.node.convertToNodeSpaceAR(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y))).x, this.node.convertToNodeSpaceAR(this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y))).y);
        for (var i = this.columns.length - 1; i > 0; i--) {
          if (1 != this.columns.length) var nor = this.columns[i].preTangentWorldPos.clone().sub(this.columns[i].columnWorldPos).normalize();
          var po = this.node.convertToNodeSpaceAR(this.columns[i].preTangentWorldPos.clone().add(nor.mul(this.lineWidth / 2)));
          this.ctx.graphics.lineTo(po.x, po.y);
          if (this.columns[i].rad >= 2 * Math.PI) {
            this.ctx.graphics.circle(this.node.convertToNodeSpaceAR(this.columns[i].columnWorldPos).x, this.node.convertToNodeSpaceAR(this.columns[i].columnWorldPos).y, this.columns[i].column.width / 2 + this.lineWidth / 2);
            this.ctx.graphics.moveTo(this.node.convertToNodeSpaceAR(this.columns[i].preTangentWorldPos).x, this.node.convertToNodeSpaceAR(this.columns[i].preTangentWorldPos).y);
          } else {
            var strad = this.radOnePointOnCircle(this.columns[i].startWorldPos, this.columns[i].columnWorldPos);
            this.ctx.graphics.arc(this.node.convertToNodeSpaceAR(this.columns[i].columnWorldPos).x, this.node.convertToNodeSpaceAR(this.columns[i].columnWorldPos).y, this.columns[i].column.width / 2 + this.lineWidth / 2, strad, strad + this.columns[i].rad, this.columns[i].rad > 0);
          }
          var norSt = this.columns[i].startWorldPos.sub(this.columns[i].columnWorldPos).normalize();
          var poSt = this.node.convertToNodeSpaceAR(this.columns[i].startWorldPos.add(norSt.mul(this.lineWidth / 2)));
          this.ctx.graphics.moveTo(poSt.x, poSt.y);
        }
        this.ctx.graphics.lineTo(0, 0);
        this.ctx.stroke();
      };
      ropeScr_001.prototype.checkColumnsPop = function() {
        if (this.columns.length > 1) {
          var p1 = this.ropeEnd.parent.convertToWorldSpaceAR(cc.v2(this.ropeEnd.position.x, this.ropeEnd.position.y));
          var p2 = this.columns[this.columns.length - 2].preTangentWorldPos;
          var results = cc.director.getPhysicsManager().rayCast(p1, p2, cc.RayCastType.Closest);
          if (0 == results.length) {
            var p3 = this.columns[this.columns.length - 1].preTangentWorldPos;
            var vec1 = p3.clone().sub(p2);
            var vec2 = p1.clone().sub(p2);
            var vec3 = this.columns[this.columns.length - 1].columnWorldPos.clone().sub(p2);
            Math.sign(vec1.cross(vec2)) != Math.sign(vec1.cross(vec3)) && this.columns.pop();
          } else cc.Vec2.distance(results[0].point, p2) <= 1 && this.columns.pop();
        }
      };
      ropeScr_001.prototype.radOnePointOnCircle = function(p, pR) {
        var ra = 0;
        var va = p.sub(pR);
        var vb = cc.v2(1, 0);
        ra = vb.signAngle(va);
        return ra;
      };
      __decorate([ property(cc.Node) ], ropeScr_001.prototype, "PointArea", void 0);
      __decorate([ property(cc.Node) ], ropeScr_001.prototype, "ropeEnd", void 0);
      __decorate([ property(cc.Float) ], ropeScr_001.prototype, "lineWidth", void 0);
      __decorate([ property(cc.Node) ], ropeScr_001.prototype, "target", void 0);
      __decorate([ property(cc.Prefab) ], ropeScr_001.prototype, "successPfb", void 0);
      __decorate([ property(GraphicsSpriteMesh_1.default) ], ropeScr_001.prototype, "ctx", void 0);
      __decorate([ property(cc.SpriteFrame) ], ropeScr_001.prototype, "spriteFrame", void 0);
      ropeScr_001 = __decorate([ ccclass ], ropeScr_001);
      return ropeScr_001;
    }(cc.Component);
    exports.default = ropeScr_001;
    cc._RF.pop();
  }, {
    "./GraphicsSpriteMesh": "GraphicsSpriteMesh"
  } ],
  Main: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "aa8f94IYVxOLqe/WMKhoaTR", "Main");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Main = void 0;
    var MessageManager_1 = require("./core/common/event/MessageManager");
    var ResLoader_1 = require("./core/common/loader/ResLoader");
    var Engine_1 = require("./core/Engine");
    var GameUIConfig_1 = require("./game/common/config/GameUIConfig");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Main = function(_super) {
      __extends(Main, _super);
      function Main() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.game = null;
        _this.gui = null;
        _this.OtherNode = null;
        return _this;
      }
      Main.prototype.start = function() {
        cc.debug.setDisplayStats(false);
        var node = Engine_1.engine.getRootNode(this.game, this.gui, this.OtherNode);
        MessageManager_1.Message.on("gamestart", this.gamestart, this);
      };
      Main.prototype.gamestart = function() {
        Engine_1.engine.initLayerManager(this.gui);
        var self = this;
        MessageManager_1.Message.off("gamestart", this.gamestart, this);
        ResLoader_1.resLoader.loadDir("CableShape", "/", function() {
          Engine_1.engine.gui.open(GameUIConfig_1.UIID.Game9);
        });
      };
      __decorate([ property({
        type: cc.Node,
        tooltip: "\u6e38\u620f\u5c42"
      }) ], Main.prototype, "game", void 0);
      __decorate([ property({
        type: cc.Node,
        tooltip: "\u754c\u9762\u5c42"
      }) ], Main.prototype, "gui", void 0);
      __decorate([ property(cc.Node) ], Main.prototype, "OtherNode", void 0);
      Main = __decorate([ ccclass ], Main);
      return Main;
    }(cc.Component);
    exports.Main = Main;
    cc._RF.pop();
  }, {
    "./core/Engine": "Engine",
    "./core/common/event/MessageManager": "MessageManager",
    "./core/common/loader/ResLoader": "ResLoader",
    "./game/common/config/GameUIConfig": "GameUIConfig"
  } ],
  MathUtils: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "0a1ccPGDaBJn7r+MLLOrAtC", "MathUtils");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.MathUtils = void 0;
    var MathUtils = function() {
      function MathUtils() {}
      MathUtils.clamp = function(a, b, x) {
        if (a > b) {
          var t = a;
          a = b;
          b = t;
        }
        if (x < a) return a;
        if (x > b) return b;
        return x;
      };
      MathUtils.getAngle = function(radian) {
        return 180 * radian / Math.PI;
      };
      MathUtils.getRadian = function(angle) {
        return angle / 180 * Math.PI;
      };
      MathUtils.getRadian2 = function(p1X, p1Y, p2X, p2Y) {
        var xdis = p2X - p1X;
        var ydis = p2Y - p1Y;
        return Math.atan2(ydis, xdis);
      };
      MathUtils.getDistance = function(p1X, p1Y, p2X, p2Y) {
        var disX = p2X - p1X;
        var disY = p2Y - p1Y;
        var disQ = disX * disX + disY * disY;
        return Math.sqrt(disQ);
      };
      MathUtils.toFixedStr = function(value, fixCount) {
        return value.toFixed(fixCount).replace(/\.?0*$/, "");
      };
      MathUtils.toPercentStr = function(value, fixCount) {
        return this.toFixedStr(100 * value, fixCount) + "%";
      };
      MathUtils.toFixedWan = function(value) {
        var wanFix = 1e5;
        var wanFloat = wanFix / 10;
        var v = Math.floor(value / wanFloat) * wanFloat;
        return value > wanFix ? MathUtils.toFixedStr(v / wanFix * 10, 1) + "\u4e07" : value.toString();
      };
      MathUtils.getFinalValueBasedOnParams = function(level, paramList, needCeil) {
        if (paramList.length < 5) return 0;
        var ret = paramList[4] * (paramList[0] * Math.pow(level, paramList[3]) + paramList[1] * level + paramList[2]);
        needCeil && (ret = Math.ceil(ret));
        return ret;
      };
      MathUtils.limit = function($from, $end) {
        $from = Math.min($from, $end);
        $end = Math.max($from, $end);
        var range = $end - $from;
        return $from + Math.random() * range;
      };
      MathUtils.limitInteger = function($from, $end) {
        return Math.round(MathUtils.limit($from, $end));
      };
      MathUtils.randomArray = function(arr) {
        var index = Math.floor(Math.random() * arr.length);
        return arr[index];
      };
      return MathUtils;
    }();
    exports.MathUtils = MathUtils;
    cc._RF.pop();
  }, {} ],
  MathUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "da0fcu35UJB+I2YCp2w5vDh", "MathUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.PolygonUtil = exports.MathUtils = void 0;
    var MathUtils = function() {
      function MathUtils() {}
      MathUtils.clamp = function(a, b, x) {
        if (a > b) {
          var t = a;
          a = b;
          b = t;
        }
        if (x < a) return a;
        if (x > b) return b;
        return x;
      };
      MathUtils.getAngle = function(radian) {
        return 180 * radian / Math.PI;
      };
      MathUtils.getRadian = function(angle) {
        return angle / 180 * Math.PI;
      };
      MathUtils.getRadian2 = function(p1X, p1Y, p2X, p2Y) {
        var xdis = p2X - p1X;
        var ydis = p2Y - p1Y;
        return Math.atan2(ydis, xdis);
      };
      MathUtils.getDistance = function(p1X, p1Y, p2X, p2Y) {
        var disX = p2X - p1X;
        var disY = p2Y - p1Y;
        var disQ = disX * disX + disY * disY;
        return Math.sqrt(disQ);
      };
      MathUtils.toFixedStr = function(value, fixCount) {
        return value.toFixed(fixCount).replace(/\.?0*$/, "");
      };
      MathUtils.toPercentStr = function(value, fixCount) {
        return this.toFixedStr(100 * value, fixCount) + "%";
      };
      MathUtils.toFixedWan = function(value) {
        var wanFix = 1e5;
        var wanFloat = wanFix / 10;
        var v = Math.floor(value / wanFloat) * wanFloat;
        return value > wanFix ? MathUtils.toFixedStr(v / wanFix * 10, 1) + "\u4e07" : value.toString();
      };
      MathUtils.getFinalValueBasedOnParams = function(level, paramList, needCeil) {
        if (paramList.length < 5) return 0;
        var ret = paramList[4] * (paramList[0] * Math.pow(level, paramList[3]) + paramList[1] * level + paramList[2]);
        needCeil && (ret = Math.ceil(ret));
        return ret;
      };
      MathUtils.limit = function($from, $end) {
        $from = Math.min($from, $end);
        $end = Math.max($from, $end);
        var range = $end - $from;
        return $from + Math.random() * range;
      };
      MathUtils.limitInteger = function($from, $end) {
        return Math.round(MathUtils.limit($from, $end));
      };
      MathUtils.randomArray = function(arr) {
        var index = Math.floor(Math.random() * arr.length);
        return arr[index];
      };
      return MathUtils;
    }();
    exports.MathUtils = MathUtils;
    var PolygonUtil = function() {
      function PolygonUtil() {}
      PolygonUtil.splitPolygonByLine = function(l0, l1, polygon, useDichotomy) {
        void 0 === useDichotomy && (useDichotomy = false);
        var result = [];
        for (var i = polygon.length - 1; i >= 0; i--) {
          var p0 = polygon[i], p1 = 0 == i ? polygon[polygon.length - 1] : polygon[i - 1];
          var _a = this.lineCrossPoint(p0, p1, l0, l1), n = _a[0], p = _a[1];
          if (-1 == n) continue;
          polygon.splice(i, -1, p);
          result.push(i + 1);
        }
        return result;
      };
      PolygonUtil.lineCrossPoint = function(p1, p2, q1, q2) {
        var a = p1, b = p2, c = q1, d = q2;
        var s1, s2, s3, s4;
        var d1, d2, d3, d4;
        var p = new cc.Vec2(0, 0);
        d1 = this.dblcmp(s1 = this.ab_cross_ac(a, b, c), 0);
        d2 = this.dblcmp(s2 = this.ab_cross_ac(a, b, d), 0);
        d3 = this.dblcmp(s3 = this.ab_cross_ac(c, d, a), 0);
        d4 = this.dblcmp(s4 = this.ab_cross_ac(c, d, b), 0);
        if (-2 == (d1 ^ d2) && -2 == (d3 ^ d4)) {
          p.x = (c.x * s2 - d.x * s1) / (s2 - s1);
          p.y = (c.y * s2 - d.y * s1) / (s2 - s1);
          return [ 0, p ];
        }
        if (0 == d1 && this.point_on_line(c, a, b) <= 0) {
          p = c;
          return [ 1, p ];
        }
        if (0 == d2 && this.point_on_line(d, a, b) <= 0) {
          p = d;
          return [ 1, p ];
        }
        if (0 == d3 && this.point_on_line(a, c, d) <= 0) {
          p = a;
          return [ 1, p ];
        }
        if (0 == d4 && this.point_on_line(b, c, d) <= 0) {
          p = b;
          return [ 1, p ];
        }
        return [ -1, null ];
      };
      PolygonUtil.isLineSegmentCross = function(P1, P2, Q1, Q2) {
        if (((Q1.x - P1.x) * (Q1.y - Q2.y) - (Q1.y - P1.y) * (Q1.x - Q2.x)) * ((Q1.x - P2.x) * (Q1.y - Q2.y) - (Q1.y - P2.y) * (Q1.x - Q2.x)) < 0 || ((P1.x - Q1.x) * (P1.y - P2.y) - (P1.y - Q1.y) * (P1.x - P2.x)) * ((P1.x - Q2.x) * (P1.y - P2.y) - (P1.y - Q2.y) * (P1.x - P2.x)) < 0) return true;
        return false;
      };
      PolygonUtil.point_on_line = function(a, p1, p2) {
        return this.dblcmp(this.dot(p1.x - a.x, p1.y - a.y, p2.x - a.x, p2.y - a.y), 0);
      };
      PolygonUtil.rayPointToLine = function(point, linePA, linePB) {
        var minX = Math.min(linePA.x, linePB.x);
        var maxX = Math.max(linePA.x, linePB.x);
        var minY = Math.min(linePA.y, linePB.y);
        var maxY = Math.max(linePA.y, linePB.y);
        if (point.y < minY || point.y > maxY || point.x > maxX) return -1;
        var x0 = linePA.x + (linePB.x - linePA.x) / (linePB.y - linePA.y) * (point.y - linePA.y);
        if (x0 > point.x) return 0;
        if (x0 == point.x) return 1;
        return -1;
      };
      PolygonUtil.relationPointToPolygon = function(point, polygon) {
        var count = 0;
        for (var i = 0; i < polygon.length; ++i) {
          if (polygon[i].equals(point)) return 2;
          var pa = polygon[i];
          var pb = polygon[0];
          i < polygon.length - 1 && (pb = polygon[i + 1]);
          var re = this.rayPointToLine(point, pa, pb);
          if (1 == re) return 1;
          0 == re && count++;
        }
        if (count % 2 == 0) return -1;
        return 0;
      };
      PolygonUtil.lineCutPolygon = function(pa, pb, polygon) {
        var ret = [];
        var points = [];
        var pointIndex = [];
        for (var i = 0; i < polygon.length; ++i) {
          points.push(polygon[i]);
          var a = polygon[i];
          var b = polygon[0];
          i < polygon.length - 1 && (b = polygon[i + 1]);
          var c = this.lineCrossPoint(pa, pb, a, b);
          if (0 == c[0]) {
            pointIndex.push(points.length);
            points.push(c[1]);
          } else c[0] > 0 && (c[1].equals(a) ? pointIndex.push(points.length - 1) : pointIndex.push(points.length));
        }
        if (pointIndex.length > 1) {
          var cp0 = points[pointIndex[0]];
          var cp1 = points[pointIndex[1]];
          var r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
          var inPolygon = r >= 0;
          if (pointIndex.length > 2 && cp0.sub(cp1).mag() > cp0.sub(points[pointIndex[pointIndex.length - 1]]).mag()) {
            cp1 = points[pointIndex[pointIndex.length - 1]];
            r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
            inPolygon = r < 0;
          }
          var firstInPolygon = inPolygon;
          var index = 0;
          var startIndex = pointIndex[index];
          var oldPoints = [];
          var newPoints = [];
          var count = 0;
          oldPoints.push(points[startIndex]);
          inPolygon && newPoints.push(points[startIndex]);
          index++;
          count++;
          startIndex++;
          while (count < points.length) {
            startIndex == points.length && (startIndex = 0);
            var p = points[startIndex];
            if (index >= 0 && startIndex == pointIndex[index]) {
              index++;
              index >= pointIndex.length && (index = 0);
              if (inPolygon) {
                newPoints.push(p);
                ret.push(newPoints);
                newPoints = [];
              } else {
                newPoints = [];
                newPoints.push(p);
              }
              oldPoints.push(p);
              inPolygon = !inPolygon;
            } else inPolygon ? newPoints.push(p) : oldPoints.push(p);
            startIndex++;
            count++;
          }
          if (inPolygon) if (!firstInPolygon && newPoints.length > 1) {
            newPoints.push(points[pointIndex[0]]);
            ret.push(newPoints);
          } else for (var i = 0; i < newPoints.length; ++i) oldPoints.push(newPoints[i]);
          ret.push(oldPoints);
        }
        return ret;
      };
      PolygonUtil.ab_cross_ac = function(a, b, c) {
        return this.cross(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y);
      };
      PolygonUtil.dot = function(x1, y1, x2, y2) {
        return x1 * x2 + y1 * y2;
      };
      PolygonUtil.cross = function(x1, y1, x2, y2) {
        return x1 * y2 - x2 * y1;
      };
      PolygonUtil.dblcmp = function(a, b) {
        if (Math.abs(a - b) <= 1e-6) return 0;
        return a > b ? 1 : -1;
      };
      return PolygonUtil;
    }();
    exports.PolygonUtil = PolygonUtil;
    cc._RF.pop();
  }, {} ],
  MessageManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b34bd6jBnVP56rP0fka3IgX", "MessageManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Message = exports.MessageEventData = void 0;
    var EventData = function() {
      function EventData() {}
      return EventData;
    }();
    var MessageEventData = function() {
      function MessageEventData() {
        this.events = {};
      }
      MessageEventData.prototype.on = function(event, listener, thisObj) {
        var list = this.events[event];
        if (null == list) {
          list = [];
          this.events[event] = list;
        }
        var data = new EventData();
        data.event = event;
        data.listener = listener;
        data.obj = thisObj;
        list.push(data);
        exports.Message.on(event, listener, thisObj);
      };
      MessageEventData.prototype.off = function(event) {
        var ebs = this.events[event];
        if (!ebs) return;
        for (var _i = 0, ebs_1 = ebs; _i < ebs_1.length; _i++) {
          var eb = ebs_1[_i];
          exports.Message.off(event, eb.listener, eb.obj);
        }
        delete this.events[event];
      };
      MessageEventData.prototype.dispatchEvent = function(event) {
        var arg = [];
        for (var _i = 1; _i < arguments.length; _i++) arg[_i - 1] = arguments[_i];
        exports.Message.dispatchEvent(event, arg);
      };
      MessageEventData.prototype.removes = function() {
        for (var event in this.events) this.off(event);
      };
      return MessageEventData;
    }();
    exports.MessageEventData = MessageEventData;
    var MessageManager = function() {
      function MessageManager() {
        this.events = {};
      }
      MessageManager.prototype.on = function(event, listener, thisObj) {
        if (!event || !listener) {
          cc.warn("\u6ce8\u518c\u3010" + event + "\u3011\u4e8b\u4ef6\u7684\u4fa6\u542c\u5668\u51fd\u6570\u4e3a\u7a7a");
          return;
        }
        var list = this.events[event];
        if (null == list) {
          list = [];
          this.events[event] = list;
        }
        var length = list.length;
        for (var i = 0; i < length; i++) {
          var bin = list[i];
          bin.listener == listener && bin.obj == thisObj && cc.warn("\u540d\u4e3a\u3010" + event + "\u3011\u7684\u4e8b\u4ef6\u91cd\u590d\u6ce8\u518c\u4fa6\u542c\u5668");
        }
        var data = new EventData();
        data.event = event;
        data.listener = listener;
        data.obj = thisObj;
        list.push(data);
      };
      MessageManager.prototype.once = function(event, listener, thisObj) {
        var _this = this;
        var _listener = function($event, $args) {
          _this.off(event, _listener, thisObj);
          _listener = null;
          listener.call(thisObj, $event, $args);
        };
        this.on(event, _listener, thisObj);
      };
      MessageManager.prototype.off = function(event, listener, thisObj) {
        var list = this.events[event];
        if (!list) {
          cc.log("\u540d\u4e3a\u3010" + event + "\u3011\u7684\u4e8b\u4ef6\u4e0d\u5b58\u5728");
          return;
        }
        var length = list.length;
        for (var i = 0; i < length; i++) {
          var bin = list[i];
          if (bin.listener == listener && bin.obj == thisObj) {
            list.splice(i, 1);
            break;
          }
        }
        0 == list.length && delete this.events[event];
      };
      MessageManager.prototype.dispatchEvent = function(event) {
        var arg = [];
        for (var _i = 1; _i < arguments.length; _i++) arg[_i - 1] = arguments[_i];
        var list = this.events[event];
        var listener = [];
        if (null != list) {
          var temp = list.concat();
          var length = temp.length;
          for (var i = 0; i < length; i++) {
            var eventBin = temp[i];
            listener.push(eventBin.listener.call(eventBin.obj, event, arg));
          }
          if (listener.length <= 1) return listener[0];
        }
      };
      MessageManager.Instance = new MessageManager();
      return MessageManager;
    }();
    exports.Message = MessageManager.Instance;
    cc._RF.pop();
  }, {} ],
  MusicPanel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "a8120YNAo5AQoG12BnDlkJK", "MusicPanel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../../core/Engine");
    var GameAudioConfig_1 = require("../../common/config/GameAudioConfig");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var MusicPanel = function(_super) {
      __extends(MusicPanel, _super);
      function MusicPanel() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.x1Node = null;
        _this.x2Node = null;
        _this.m_b = true;
        _this.se_b = true;
        return _this;
      }
      MusicPanel.prototype.start = function() {
        this.up();
      };
      MusicPanel.prototype.up = function() {
        this.getArchive();
        if (this.m_b) {
          Engine_1.engine.audio.setSwitchMusic(true);
          this.x2Node.active = false;
        } else {
          Engine_1.engine.audio.setSwitchMusic(false);
          this.x2Node.active = true;
        }
        if (this.se_b) {
          Engine_1.engine.audio.setSwitchEffect(true);
          this.x1Node.active = false;
        } else {
          Engine_1.engine.audio.setSwitchEffect(false);
          this.x1Node.active = true;
        }
        this.Archive();
      };
      MusicPanel.prototype.Archive = function() {
        var data = JSON.stringify({
          Music: this.m_b,
          SoundEffect: this.se_b
        });
        localStorage.setItem("set", data);
      };
      MusicPanel.prototype.getArchive = function() {
        var value = localStorage.getItem("set");
        if (value) {
          var data = JSON.parse(value);
          if (data) {
            this.m_b = data.Music;
            this.se_b = data.SoundEffect;
          }
        }
      };
      MusicPanel.prototype.setm = function() {
        Engine_1.engine.audio.playEffect(GameAudioConfig_1.AuidoID.btnClick);
        this.m_b = !this.m_b;
        if (this.m_b) {
          Engine_1.engine.audio.setSwitchMusic(true);
          Engine_1.engine.audio.playMusic(GameAudioConfig_1.AuidoID.Bg);
          this.x2Node.active = false;
        } else {
          Engine_1.engine.audio.setSwitchMusic(false);
          this.x2Node.active = true;
        }
        this.Archive();
        this.up();
      };
      MusicPanel.prototype.setse = function() {
        Engine_1.engine.audio.playEffect(GameAudioConfig_1.AuidoID.btnClick);
        this.se_b = !this.se_b;
        if (this.se_b) {
          Engine_1.engine.audio.setSwitchEffect(true);
          Engine_1.engine.audio.playEffect(GameAudioConfig_1.AuidoID.btnClick);
          this.x1Node.active = false;
        } else {
          Engine_1.engine.audio.setSwitchEffect(false);
          this.x1Node.active = true;
        }
        this.Archive();
        this.up();
      };
      __decorate([ property(cc.Node) ], MusicPanel.prototype, "x1Node", void 0);
      __decorate([ property(cc.Node) ], MusicPanel.prototype, "x2Node", void 0);
      MusicPanel = __decorate([ ccclass ], MusicPanel);
      return MusicPanel;
    }(cc.Component);
    exports.default = MusicPanel;
    cc._RF.pop();
  }, {
    "../../../core/Engine": "Engine",
    "../../common/config/GameAudioConfig": "GameAudioConfig"
  } ],
  NetChannelManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "87dfbvA/RNJuYvsPXda/vEj", "NetChannelManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.netChannel = exports.NetChannelManager = exports.NetChannelType = void 0;
    var NetChannelType;
    (function(NetChannelType) {
      NetChannelType[NetChannelType["Game"] = 0] = "Game";
    })(NetChannelType = exports.NetChannelType || (exports.NetChannelType = {}));
    var NetChannelManager = function() {
      function NetChannelManager() {}
      return NetChannelManager;
    }();
    exports.NetChannelManager = NetChannelManager;
    exports.netChannel = new NetChannelManager();
    cc._RF.pop();
  }, {} ],
  NetConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "811e5Bbq+9NMZuWbiHs7+iU", "NetConfig");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NetConfig = exports.HttpUrlName = void 0;
    var Engine_1 = require("../../../core/Engine");
    var SingletonModuleComp_1 = require("../../SingletonModuleComp");
    var HttpUrlName;
    (function(HttpUrlName) {
      HttpUrlName["getLoginUrls"] = "login_interface";
      HttpUrlName["setSaveInfoInterFace"] = "setSaveInfoInterFace";
      HttpUrlName["getSaveInfoInterFace"] = "getSaveInfoInterFace";
      HttpUrlName["getSaveData"] = "getSaveData";
      HttpUrlName["setSaveData"] = "setSaveData";
      HttpUrlName["delSavaData"] = "delSaveData";
      HttpUrlName["setUserAuth"] = "setUserAuth";
      HttpUrlName["userBehaviorRecord"] = "userBehaviorRecord";
    })(HttpUrlName = exports.HttpUrlName || (exports.HttpUrlName = {}));
    var LOCA_LSTORY_KEY = "game_netconfig";
    var NetConfig = function(_super) {
      __extends(NetConfig, _super);
      function NetConfig() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.local_data = {};
        _this.nickName = "\u6d4b\u8bd5\u89d2\u8272";
        _this.Version = "1.0.30";
        _this._localStorageTag = "XYC";
        _this.SaveVersion = 1001;
        return _this;
      }
      Object.defineProperty(NetConfig, "instance", {
        get: function() {
          if (null == this._instance) {
            var node = new cc.Node("NetConfig");
            cc.game.addPersistRootNode(node);
            this._instance = node.addComponent(NetConfig);
            this._instance.init();
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      NetConfig.prototype.init = function() {
        var data = Engine_1.engine.storage.getItem(this._localStorageTag);
        if (data && "" != data) try {
          this.local_data = JSON.parse(data);
          this.Version = this.local_data.Version;
        } catch (err) {
          this.local_data = {};
        }
      };
      NetConfig.prototype.httpconfigInit = function($$_data) {
        if (this._data === $$_data) return;
        this._data = $$_data;
      };
      NetConfig.prototype.setHttpServer = function(data) {
        var tempdata = data;
        tempdata <= 0;
      };
      NetConfig.prototype.setUuid = function(value) {
        this.userUid = value;
        this._localStorageTag = LOCA_LSTORY_KEY + "_" + this.userUid;
      };
      NetConfig.prototype.getuserToken = function() {
        return cc.sys.isMobile || cc.sys.platform == cc.sys.WECHAT_GAME ? this.userToken : "ef2b16ba8aa1407683df6cb04e54e369";
      };
      NetConfig.prototype.getuuid = function() {
        return cc.sys.isMobile || cc.sys.platform == cc.sys.WECHAT_GAME ? this.userUid : "548551a1454873aac023c539f9cdsdf3";
      };
      NetConfig.prototype.getUserData = function(completeBack, errorBack) {
        var self = this;
        var parma = {
          token: self.getuserToken(),
          uuid: self.getuuid()
        };
      };
      NetConfig.prototype.setUserData = function(completeBack, errorBack) {
        var self = this;
        var parma = {
          token: self.getuserToken(),
          uuid: self.getuuid(),
          Progress: self.getSaveData()
        };
      };
      NetConfig.prototype.delUserData = function() {
        var self = this;
        var parma = {
          token: self.getuserToken(),
          uuid: self.getuuid()
        };
      };
      NetConfig.prototype.setUserAuth = function(data, completeBack) {
        var self = this;
        var parma = {
          token: self.getuserToken(),
          uuid: self.getuuid(),
          data: data
        };
      };
      NetConfig.prototype.getVCheck = function(completeBack, errorCallback) {
        if (!cc.sys.isMobile) return;
        var self = this;
        var parma = {
          gameTag: Engine_1.engine.gameId,
          platformTag: Engine_1.engine.CC_Platform + ""
        };
      };
      NetConfig.prototype.save = function() {
        this.local_data.Version = this.Version;
        var data = JSON.stringify(this.local_data);
        Engine_1.engine.storage.setItem(this._localStorageTag, data);
      };
      NetConfig.prototype.getSaveData = function() {
        var Progress = {};
        Progress.version = this.SaveVersion;
        Progress.KHDversion = "\u6d4b\u8bd5\u7248";
        var version = Engine_1.engine.storage.getItem("SaveVersion");
        version && "" != version && (this.SaveVersion = version);
        this.SaveVersion++;
        Progress.AccountModel = SingletonModuleComp_1.SingletonModule.account.AccountModel.returnData();
        Engine_1.engine.storage.setItem("SaveVersion", this.SaveVersion);
        return Progress;
      };
      NetConfig.prototype.setSaveData = function(Progress) {
        console.log("\u83b7\u5f97\u7684\u7f51\u7edc\u5b58\u6863\uff1a");
        console.log(Progress);
        var version = Engine_1.engine.storage.getItem("SaveVersion");
        version && "" != version && (this.SaveVersion = version);
        if (!Progress || this.SaveVersion >= Progress.version) {
          SingletonModuleComp_1.SingletonModule.account.state = true;
          return;
        }
        this.SaveVersion = Progress.version;
        SingletonModuleComp_1.SingletonModule.account.AccountModel.setData(Progress.AccountModel);
        SingletonModuleComp_1.SingletonModule.account.state = true;
        Engine_1.engine.storage.setItem("SaveVersion", this.SaveVersion);
      };
      NetConfig.prototype.userBehaviorRecord = function(recordDataArray, completeBack, errorCallback) {
        var self = this;
        var parma = {
          token: self.getuserToken(),
          uuid: self.getuuid(),
          data: recordDataArray
        };
      };
      return NetConfig;
    }(cc.Component);
    exports.NetConfig = NetConfig;
    cc._RF.pop();
  }, {
    "../../../core/Engine": "Engine",
    "../../SingletonModuleComp": "SingletonModuleComp"
  } ],
  NetGameTips: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cb5e2cFvZhF2on8AfRf+mdL", "NetGameTips");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NetGameTips = void 0;
    var MessageManager_1 = require("../../../core/common/event/MessageManager");
    var Logger_1 = require("../../../core/common/log/Logger");
    var TipsManager_1 = require("../../../core/gui/prompt/TipsManager");
    var GameEvent_1 = require("../config/GameEvent");
    var NetGameTips = function() {
      function NetGameTips() {}
      NetGameTips.prototype.connectTips = function(isShow) {
        if (isShow) {
          Logger_1.Logger.logNet("\u6e38\u620f\u670d\u52a1\u5668\u6b63\u5728\u8fde\u63a5");
          TipsManager_1.tips.netInstableOpen();
        } else {
          Logger_1.Logger.logNet("\u6e38\u620f\u670d\u52a1\u5668\u8fde\u63a5\u6210\u529f");
          TipsManager_1.tips.netInstableClose();
          MessageManager_1.Message.dispatchEvent(GameEvent_1.GameEvent.RequsetDataSuccess);
        }
      };
      NetGameTips.prototype.disconnectTips = function() {
        TipsManager_1.tips.alert("net_server_disconnected", function() {});
      };
      NetGameTips.prototype.reconnectTips = function(isShow) {};
      NetGameTips.prototype.requestTips = function(isShow) {
        isShow;
      };
      NetGameTips.prototype.responseErrorCode = function(code) {
        console.log("\u6e38\u620f\u670d\u52a1\u5668\u9519\u8bef\u7801", code);
        code < 0 ? TipsManager_1.tips.alert("netcode_" + code, function() {}) : TipsManager_1.tips.alert("netcode_" + code);
      };
      return NetGameTips;
    }();
    exports.NetGameTips = NetGameTips;
    cc._RF.pop();
  }, {
    "../../../core/common/event/MessageManager": "MessageManager",
    "../../../core/common/log/Logger": "Logger",
    "../../../core/gui/prompt/TipsManager": "TipsManager",
    "../config/GameEvent": "GameEvent"
  } ],
  NetInterface: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "11f42ynkSpJp4rzmKOctZpc", "NetInterface");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.DefStringProtocol = void 0;
    var unzip = function(str) {
      var charData = str.split("").map(function(x) {
        return x.charCodeAt(0);
      });
      var binData = new Uint8Array(charData);
      var data = pako.inflate(binData, {
        to: "string"
      });
      return data;
    };
    var zip = function(str) {
      var binaryString = pako.gzip(str, {
        to: "string"
      });
      return binaryString;
    };
    var DefStringProtocol = function() {
      function DefStringProtocol() {}
      DefStringProtocol.prototype.getHeadlen = function() {
        return 0;
      };
      DefStringProtocol.prototype.getHearbeat = function() {
        return "";
      };
      DefStringProtocol.prototype.getPackageLen = function(msg) {
        return msg.toString().length;
      };
      DefStringProtocol.prototype.checkResponsePackage = function(respProtocol) {
        return true;
      };
      DefStringProtocol.prototype.handlerResponsePackage = function(respProtocol) {
        if (1 == respProtocol.code) {
          respProtocol.isCompress && (respProtocol.data = unzip(respProtocol.data));
          respProtocol.data = JSON.parse(respProtocol.data);
          return true;
        }
        return false;
      };
      DefStringProtocol.prototype.handlerRequestPackage = function(reqProtocol) {
        var rspCmd = reqProtocol.action + "_" + reqProtocol.method;
        reqProtocol.callback = rspCmd;
        reqProtocol.isCompress && (reqProtocol.data = zip(reqProtocol.data));
        return rspCmd;
      };
      DefStringProtocol.prototype.getPackageId = function(respProtocol) {
        return respProtocol.callback;
      };
      return DefStringProtocol;
    }();
    exports.DefStringProtocol = DefStringProtocol;
    cc._RF.pop();
  }, {} ],
  NetManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "5388dTKTtFH74BkH6nvh972", "NetManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NetManager = void 0;
    var NetManager = function() {
      function NetManager() {}
      return NetManager;
    }();
    exports.NetManager = NetManager;
    cc._RF.pop();
  }, {} ],
  NetNodeGame: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "335a88WV8pKfKkvpE6agYPU", "NetNodeGame");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NetNodeGame = void 0;
    var NetNode_1 = require("../../../core/network/NetNode");
    var NetNodeGame = function(_super) {
      __extends(NetNodeGame, _super);
      function NetNodeGame() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      return NetNodeGame;
    }(NetNode_1.NetNode);
    exports.NetNodeGame = NetNodeGame;
    cc._RF.pop();
  }, {
    "../../../core/network/NetNode": "NetNode"
  } ],
  NetNode: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2e8bdYMJYJFaabNiA/DKli1", "NetNode");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NetNode = void 0;
    var NetNode = function() {
      function NetNode() {}
      return NetNode;
    }();
    exports.NetNode = NetNode;
    cc._RF.pop();
  }, {} ],
  NetState: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "e3cba1NPEZBtY7e0klDdfLR", "NetState");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    cc._RF.pop();
  }, {} ],
  NotifyComponent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4ebb3z4/LVPW5KNKd2anLh8", "NotifyComponent");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.NotifyComponent = void 0;
    var GameComponent_1 = require("../../common/component/GameComponent");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var NotifyComponent = function(_super) {
      __extends(NotifyComponent, _super);
      function NotifyComponent() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.lab_content = null;
        _this.showtime = 1;
        return _this;
      }
      NotifyComponent.prototype.onFinished = function() {
        this.node.destroy();
      };
      NotifyComponent.prototype.toast = function(msg, time, useI18n) {
        var _this = this;
        this.showtime = time;
        this.showtime < 1 && (this.showtime = 1);
        this.lab_content.string = msg;
        cc.tween(this.node).delay(.15).by(this.showtime, {
          position: new cc.Vec3(0, 150, 0)
        }, {
          easing: "fade"
        }).call(function() {
          _this.onFinished();
        }).start();
        cc.tween(this.node).delay(.15 + this.showtime - 1).to(.9, {
          opacity: 55
        }, {
          easing: "fade"
        }).start();
      };
      __decorate([ property(cc.Label) ], NotifyComponent.prototype, "lab_content", void 0);
      NotifyComponent = __decorate([ ccclass ], NotifyComponent);
      return NotifyComponent;
    }(GameComponent_1.GameComponent);
    exports.NotifyComponent = NotifyComponent;
    cc._RF.pop();
  }, {
    "../../common/component/GameComponent": "GameComponent"
  } ],
  OPPOPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "95a9dAP6aRO6Jl8EJi2Gojl", "OPPOPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.OPPOPlatform = void 0;
    var OPPOPlatform = function() {
      function OPPOPlatform() {
        this.RewardedAdBol = false;
        this.BannerBol = false;
        this.CustomBol = false;
      }
      OPPOPlatform.prototype.init = function() {};
      OPPOPlatform.prototype.login = function(callback) {};
      OPPOPlatform.prototype.request = function(url, data, method, callback) {};
      OPPOPlatform.prototype.getUserInfo = function(callback) {};
      OPPOPlatform.prototype.saveUserInfo = function(userName, url, callback) {};
      OPPOPlatform.prototype.getSystemInfo = function() {};
      OPPOPlatform.prototype.createRewardedAd = function(ADNum) {};
      OPPOPlatform.prototype.showRewardedAd = function(callback) {};
      OPPOPlatform.prototype.createInterstitialAd = function() {};
      OPPOPlatform.prototype.showInterstitialAd = function() {};
      OPPOPlatform.prototype.showBannerAd = function(bannerType, top, left, width, BannerAd) {};
      OPPOPlatform.prototype.hideBannerAd = function() {};
      OPPOPlatform.prototype.CreateCustomAd = function(ADNum, type) {};
      OPPOPlatform.prototype.hideCustomAd = function() {};
      OPPOPlatform.prototype.CreateSquaredUpAd = function(callback) {};
      OPPOPlatform.prototype.SquareUpAdDestroy = function() {};
      OPPOPlatform.prototype.onShare = function(callback) {};
      OPPOPlatform.prototype.addShortcut = function(callback) {};
      OPPOPlatform.prototype.checkShortcut = function(callback) {};
      OPPOPlatform.prototype.vibrateShort = function(vibrateType) {};
      OPPOPlatform.prototype.vibrateLong = function() {};
      OPPOPlatform.prototype.exitGame = function() {};
      return OPPOPlatform;
    }();
    exports.OPPOPlatform = OPPOPlatform;
    cc._RF.pop();
  }, {} ],
  ObjectUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "78c9eWArN9BGKOIxZ5O5ATq", "ObjectUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ObjectUtil = function() {
      function ObjectUtil() {}
      ObjectUtil.isObject = function(value) {
        return "[object Object]" === Object.prototype.toString.call(value);
      };
      ObjectUtil.deepCopy = function(target) {
        if (null == target || "object" !== typeof target) return target;
        var result = null;
        if (target instanceof Date) {
          result = new Date();
          result.setTime(target.getTime());
          return result;
        }
        if (target instanceof Array) {
          result = [];
          for (var i = 0, length = target.length; i < length; i++) result[i] = this.deepCopy(target[i]);
          return result;
        }
        if (target instanceof Object) {
          result = {};
          for (var key in target) target.hasOwnProperty(key) && (result[key] = this.deepCopy(target[key]));
          return result;
        }
        console.warn("\u4e0d\u652f\u6301\u7684\u7c7b\u578b\uff1a" + result);
      };
      ObjectUtil.copy = function(target) {
        return JSON.parse(JSON.stringify(target));
      };
      return ObjectUtil;
    }();
    exports.default = ObjectUtil;
    cc._RF.pop();
  }, {} ],
  PaoGame: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "16509cnSyVF+4Vv7z/p212p", "PaoGame");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Ball_1 = require("./Ball");
    var CameraFollow_1 = require("./CameraFollow");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PaoGame = function(_super) {
      __extends(PaoGame, _super);
      function PaoGame() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.fail = null;
        _this.circles = [];
        _this.ball = null;
        _this.cameraFollow = null;
        _this.lastTarget = null;
        return _this;
      }
      PaoGame_1 = PaoGame;
      PaoGame.prototype.onEnable = function() {
        PaoGame_1.instance = this;
        cc.director.getPhysicsManager().enabled = true;
      };
      PaoGame.prototype.start = function() {
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.overPosY = -cc.view.getVisibleSize().height / 2;
        console.log("Version ============================> 1.0.1");
      };
      PaoGame.prototype.update = function(dt) {
        this.checkEnd();
      };
      PaoGame.prototype.register = function(circle) {
        this.circles.push(circle);
      };
      PaoGame.prototype.onTouchEnd = function() {
        this.ball.input();
      };
      PaoGame.prototype.checkEnd = function() {
        if (this.ball && this.ball.node.position.y <= this.overPosY) {
          this.ball.state = Ball_1.ballState.none;
          this.fail.active = true;
        }
      };
      PaoGame.prototype.onBallAttach = function(target) {
        this.lastTarget && this.cameraFollow.adjustCamera(target.position.clone().sub(this.lastTarget.position));
        this.lastTarget = target;
      };
      var PaoGame_1;
      PaoGame.instance = null;
      __decorate([ property(cc.Node) ], PaoGame.prototype, "fail", void 0);
      __decorate([ property(CameraFollow_1.default) ], PaoGame.prototype, "cameraFollow", void 0);
      PaoGame = PaoGame_1 = __decorate([ ccclass ], PaoGame);
      return PaoGame;
    }(cc.Component);
    exports.default = PaoGame;
    cc._RF.pop();
  }, {
    "./Ball": "Ball",
    "./CameraFollow": "CameraFollow"
  } ],
  PersonalPanel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ea3c1e5IrpIba4mt4POsdOF", "PersonalPanel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../core/Engine");
    var MessageManager_1 = require("../core/common/event/MessageManager");
    var SingletonModuleComp_1 = require("./SingletonModuleComp");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PersonalPanel = function(_super) {
      __extends(PersonalPanel, _super);
      function PersonalPanel() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.yszcNode = null;
        _this.yhxyNode = null;
        return _this;
      }
      PersonalPanel.prototype.tyBtnClick = function() {
        SingletonModuleComp_1.SingletonModule.account.AccountModel.xgFun();
        MessageManager_1.Message.dispatchEvent("gamestart");
      };
      PersonalPanel.prototype.jjBtnClick = function() {
        Engine_1.engine.platform.ExitGame();
      };
      PersonalPanel.prototype.ClickYszc = function() {
        this.yszcNode.active = true;
      };
      PersonalPanel.prototype.ClickYsxy = function() {
        this.yhxyNode.active = true;
      };
      PersonalPanel.prototype.SureClickYszc = function() {
        this.yszcNode.active = false;
      };
      PersonalPanel.prototype.SureClickYsxy = function() {
        this.yhxyNode.active = false;
      };
      __decorate([ property(cc.Node) ], PersonalPanel.prototype, "yszcNode", void 0);
      __decorate([ property(cc.Node) ], PersonalPanel.prototype, "yhxyNode", void 0);
      PersonalPanel = __decorate([ ccclass ], PersonalPanel);
      return PersonalPanel;
    }(cc.Component);
    exports.default = PersonalPanel;
    cc._RF.pop();
  }, {
    "../core/Engine": "Engine",
    "../core/common/event/MessageManager": "MessageManager",
    "./SingletonModuleComp": "SingletonModuleComp"
  } ],
  PlatformManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "05631DkG31LIYp6ziiRfZf/", "PlatformManager");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.AdType = exports.BannerType = exports.VibrateType = exports.RecordStatu = void 0;
    var Engine_1 = require("../Engine");
    var KsPlatform_1 = require("./KsPlatform");
    var OPPOPlatform_1 = require("./OPPOPlatform");
    var TikTokPlatform_1 = require("./TikTokPlatform");
    var VIVOPlatform_1 = require("./VIVOPlatform");
    var WechatPlatform_1 = require("./WechatPlatform");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var RecordStatu;
    (function(RecordStatu) {
      RecordStatu[RecordStatu["Inactive"] = 0] = "Inactive";
      RecordStatu[RecordStatu["Recording"] = 1] = "Recording";
      RecordStatu[RecordStatu["Finished"] = 2] = "Finished";
    })(RecordStatu = exports.RecordStatu || (exports.RecordStatu = {}));
    var VibrateType;
    (function(VibrateType) {
      VibrateType[VibrateType["Heavy"] = 0] = "Heavy";
      VibrateType[VibrateType["Medium"] = 1] = "Medium";
      VibrateType[VibrateType["Light"] = 2] = "Light";
    })(VibrateType = exports.VibrateType || (exports.VibrateType = {}));
    var BannerType;
    (function(BannerType) {
      BannerType[BannerType["None"] = 0] = "None";
      BannerType[BannerType["Top"] = 1] = "Top";
      BannerType[BannerType["Center"] = 2] = "Center";
      BannerType[BannerType["Bottom"] = 3] = "Bottom";
    })(BannerType = exports.BannerType || (exports.BannerType = {}));
    var AdType;
    (function(AdType) {
      AdType[AdType["RewardedAd"] = 0] = "RewardedAd";
      AdType[AdType["InterstitialAd"] = 1] = "InterstitialAd";
      AdType[AdType["BannerAd"] = 2] = "BannerAd";
    })(AdType = exports.AdType || (exports.AdType = {}));
    var PlatformManager = function(_super) {
      __extends(PlatformManager, _super);
      function PlatformManager() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      PlatformManager_1 = PlatformManager;
      Object.defineProperty(PlatformManager, "instance", {
        get: function() {
          if (null == this._instance) {
            var node = new cc.Node("PlatformManager");
            cc.game.addPersistRootNode(node);
            this._instance = node.addComponent(PlatformManager_1);
            Engine_1.engine.isWechat() && (this._instance.platform = new WechatPlatform_1.WeChatPlatform());
            Engine_1.engine.isTiktok() && (this._instance.platform = new TikTokPlatform_1.TikTokPlatform());
            Engine_1.engine.isKs() && (this._instance.platform = new KsPlatform_1.KsPlatform());
            Engine_1.engine.isOppo() && (this._instance.platform = new OPPOPlatform_1.OPPOPlatform());
            Engine_1.engine.isVivo() && (this._instance.platform = new VIVOPlatform_1.VIVOPlatform());
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      PlatformManager.prototype.init = function() {
        if (Engine_1.engine.isEditor()) return;
        console.log("\u521d\u59cb\u5316\u5e73\u53f0");
        this.platform.init();
      };
      PlatformManager.prototype.login = function(callback) {
        if (Engine_1.engine.isEditor()) {
          callback(true, null);
          return;
        }
        console.log("\u767b\u5f55");
        if (this.platform.login(callback)) {
          console.log("\u7ed9\u51fa\u56de\u8c03");
          callback(true, null);
        }
      };
      PlatformManager.prototype.request = function(url, data, method, callback) {
        if (Engine_1.engine.isEditor()) {
          callback(true, null);
          return;
        }
        this.platform.request(url, data, method, callback);
      };
      PlatformManager.prototype.getUserInfo = function(callback) {
        if (Engine_1.engine.isEditor()) {
          callback(true, null);
          return;
        }
        this.platform.getUserInfo(callback);
      };
      PlatformManager.prototype.saveUserInfo = function(userName, url, callback) {
        if (Engine_1.engine.isEditor()) {
          callback(true, null);
          return;
        }
        this.platform.saveUserInfo(userName, url, callback);
      };
      PlatformManager.prototype.setClipboardData = function(sourcedata) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.setClipboardData(sourcedata);
      };
      PlatformManager.prototype.getSystemInfo = function() {
        if (Engine_1.engine.isEditor()) return null;
        return this.platform.getSystemInfo();
      };
      PlatformManager.prototype.restartGame = function() {
        if (Engine_1.engine.isEditor()) return;
        this.platform.restartGame();
      };
      PlatformManager.prototype.onShare = function(callback) {
        if (Engine_1.engine.isEditor()) {
          callback();
          return;
        }
        this.platform.onShare(callback);
      };
      PlatformManager.prototype.vibrateShort = function(vibrateType) {
        void 0 === vibrateType && (vibrateType = VibrateType.Medium);
        if (Engine_1.engine.isEditor()) return;
        this.platform.vibrateShort(vibrateType);
      };
      PlatformManager.prototype.vibrateLong = function() {
        if (Engine_1.engine.isEditor()) return;
        this.platform.vibrateLong();
      };
      PlatformManager.prototype.addShortcut = function(callback) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isWechat()) {
          callback(false);
          return;
        }
        this.platform.addShortcut(callback);
      };
      PlatformManager.prototype.checkShortcut = function(callback) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isWechat()) {
          callback(false);
          return;
        }
        return this.platform.checkShortcut(callback);
      };
      PlatformManager.prototype.showFavoriteGuide = function(callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        return this.platform.showFavoriteGuide(callback);
      };
      PlatformManager.prototype.checkFollowState = function(callback) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isWechat()) {
          callback(false);
          return;
        }
        return this.platform.checkFollowState(callback);
      };
      PlatformManager.prototype.followOfficialAccount = function(callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        this.platform.followOfficialAccount(callback);
      };
      PlatformManager.prototype.openAwemeUserProfile = function(callback) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isWechat()) {
          callback(false);
          return;
        }
        this.platform.openAwemeUserProfile(callback);
      };
      PlatformManager.prototype.checkFollowAwemeState = function(callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        return this.platform.checkFollowAwemeState(callback);
      };
      PlatformManager.prototype.followAwemeUser = function(callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        this.platform.followAwemeUser(callback);
      };
      PlatformManager.prototype.setImRankData = function(options, callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        this.platform.setImRankData(options, callback);
      };
      PlatformManager.prototype.getImRankList = function(options, callback) {
        if (!Engine_1.engine.isTiktok()) {
          callback(false);
          return;
        }
        this.platform.getImRankList(options, callback);
      };
      PlatformManager.prototype.startGameRecord = function() {
        if (Engine_1.engine.isEditor()) return;
        this.platform.startGameRecord();
      };
      PlatformManager.prototype.stopGameRecord = function() {
        if (Engine_1.engine.isEditor()) return;
        this.platform.stopGameRecord();
      };
      PlatformManager.prototype.shareGameRecord = function(callback) {
        if (Engine_1.engine.isEditor()) return;
        this.platform.shareGameRecord(callback);
      };
      PlatformManager.prototype.isRecordingTooShort = function() {
        if (Engine_1.engine.isEditor()) return;
        return this.platform.isRecordingTooShort();
      };
      PlatformManager.prototype.getRecordStatu = function() {
        if (Engine_1.engine.isEditor()) return;
        return this.platform.getRecordStatu();
      };
      PlatformManager.prototype.showRewardedAd = function(callback) {
        if (Engine_1.engine.isEditor()) {
          callback(true);
          return;
        }
        this.platform.showRewardedAd(callback);
      };
      PlatformManager.prototype.showInterstitialAd = function() {
        if (Engine_1.engine.isEditor()) return;
        this.platform.showInterstitialAd();
      };
      PlatformManager.prototype.showBannerAd = function(bannerType, top, left, width) {
        void 0 === bannerType && (bannerType = BannerType.None);
        void 0 === top && (top = 0);
        void 0 === left && (left = 0);
        void 0 === width && (width = 300);
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.showBannerAd(bannerType, top, left, width);
      };
      PlatformManager.prototype.hideBannerAd = function() {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.hideBannerAd();
      };
      PlatformManager.prototype.createCustomAd = function(ADNum, type) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.CreateCustomAd(ADNum, type);
      };
      PlatformManager.prototype.hideCustomAd = function() {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.hideCustomAd();
      };
      PlatformManager.prototype.CreateSquaredUpAd = function(callback) {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        return this.platform.CreateSquaredUpAd(callback);
      };
      PlatformManager.prototype.SquareUpAdDestroy = function() {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        return this.platform.SquareUpAdDestroy();
      };
      PlatformManager.prototype.ExitGame = function() {
        if (Engine_1.engine.isEditor() || Engine_1.engine.isKs()) return;
        this.platform.exitGame();
      };
      var PlatformManager_1;
      PlatformManager = PlatformManager_1 = __decorate([ ccclass ], PlatformManager);
      return PlatformManager;
    }(cc.Component);
    exports.default = PlatformManager;
    cc._RF.pop();
  }, {
    "../Engine": "Engine",
    "./KsPlatform": "KsPlatform",
    "./OPPOPlatform": "OPPOPlatform",
    "./TikTokPlatform": "TikTokPlatform",
    "./VIVOPlatform": "VIVOPlatform",
    "./WechatPlatform": "WechatPlatform"
  } ],
  Plolygon: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "dca82EjIqdDW7umDC/0TZJz", "Plolygon");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Plolygon = void 0;
    var Plolygon = function() {
      function Plolygon() {}
      Plolygon.splitPolygonByLine = function(l0, l1, polygon, useDichotomy) {
        void 0 === useDichotomy && (useDichotomy = false);
        var result = [];
        for (var i = polygon.length - 1; i >= 0; i--) {
          var p0 = polygon[i], p1 = 0 == i ? polygon[polygon.length - 1] : polygon[i - 1];
          var _a = this.lineCrossPoint(p0, p1, l0, l1), n = _a[0], p = _a[1];
          if (-1 == n) continue;
          polygon.splice(i, -1, p);
          result.push(i + 1);
        }
        return result;
      };
      Plolygon.lineCrossPoint = function(p1, p2, q1, q2) {
        var a = p1, b = p2, c = q1, d = q2;
        var s1, s2, s3, s4;
        var d1, d2, d3, d4;
        var p = new cc.Vec2(0, 0);
        d1 = this.dblcmp(s1 = this.ab_cross_ac(a, b, c), 0);
        d2 = this.dblcmp(s2 = this.ab_cross_ac(a, b, d), 0);
        d3 = this.dblcmp(s3 = this.ab_cross_ac(c, d, a), 0);
        d4 = this.dblcmp(s4 = this.ab_cross_ac(c, d, b), 0);
        if (-2 == (d1 ^ d2) && -2 == (d3 ^ d4)) {
          p.x = (c.x * s2 - d.x * s1) / (s2 - s1);
          p.y = (c.y * s2 - d.y * s1) / (s2 - s1);
          return [ 0, p ];
        }
        if (0 == d1 && this.point_on_line(c, a, b) <= 0) {
          p = c;
          return [ 1, p ];
        }
        if (0 == d2 && this.point_on_line(d, a, b) <= 0) {
          p = d;
          return [ 1, p ];
        }
        if (0 == d3 && this.point_on_line(a, c, d) <= 0) {
          p = a;
          return [ 1, p ];
        }
        if (0 == d4 && this.point_on_line(b, c, d) <= 0) {
          p = b;
          return [ 1, p ];
        }
        return [ -1, null ];
      };
      Plolygon.isLineSegmentCross = function(P1, P2, Q1, Q2) {
        if (((Q1.x - P1.x) * (Q1.y - Q2.y) - (Q1.y - P1.y) * (Q1.x - Q2.x)) * ((Q1.x - P2.x) * (Q1.y - Q2.y) - (Q1.y - P2.y) * (Q1.x - Q2.x)) < 0 || ((P1.x - Q1.x) * (P1.y - P2.y) - (P1.y - Q1.y) * (P1.x - P2.x)) * ((P1.x - Q2.x) * (P1.y - P2.y) - (P1.y - Q2.y) * (P1.x - P2.x)) < 0) return true;
        return false;
      };
      Plolygon.point_on_line = function(a, p1, p2) {
        return this.dblcmp(this.dot(p1.x - a.x, p1.y - a.y, p2.x - a.x, p2.y - a.y), 0);
      };
      Plolygon.rayPointToLine = function(point, linePA, linePB) {
        var minX = Math.min(linePA.x, linePB.x);
        var maxX = Math.max(linePA.x, linePB.x);
        var minY = Math.min(linePA.y, linePB.y);
        var maxY = Math.max(linePA.y, linePB.y);
        if (point.y < minY || point.y > maxY || point.x > maxX) return -1;
        var x0 = linePA.x + (linePB.x - linePA.x) / (linePB.y - linePA.y) * (point.y - linePA.y);
        if (x0 > point.x) return 0;
        if (x0 == point.x) return 1;
        return -1;
      };
      Plolygon.relationPointToPolygon = function(point, polygon) {
        var count = 0;
        for (var i = 0; i < polygon.length; ++i) {
          if (polygon[i].equals(point)) return 2;
          var pa = polygon[i];
          var pb = polygon[0];
          i < polygon.length - 1 && (pb = polygon[i + 1]);
          var re = this.rayPointToLine(point, pa, pb);
          if (1 == re) return 1;
          0 == re && count++;
        }
        if (count % 2 == 0) return -1;
        return 0;
      };
      Plolygon.lineCutPolygon = function(pa, pb, polygon) {
        var ret = [];
        var points = [];
        var pointIndex = [];
        for (var i = 0; i < polygon.length; ++i) {
          points.push(polygon[i]);
          var a = polygon[i];
          var b = polygon[0];
          i < polygon.length - 1 && (b = polygon[i + 1]);
          var c = this.lineCrossPoint(pa, pb, a, b);
          if (0 == c[0]) {
            pointIndex.push(points.length);
            points.push(c[1]);
          } else c[0] > 0 && (c[1].equals(a) ? pointIndex.push(points.length - 1) : pointIndex.push(points.length));
        }
        if (pointIndex.length > 1) {
          var cp0 = points[pointIndex[0]];
          var cp1 = points[pointIndex[1]];
          var r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
          var inPolygon = r >= 0;
          if (pointIndex.length > 2 && cp0.sub(cp1).mag() > cp0.sub(points[pointIndex[pointIndex.length - 1]]).mag()) {
            cp1 = points[pointIndex[pointIndex.length - 1]];
            r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
            inPolygon = r < 0;
          }
          var firstInPolygon = inPolygon;
          var index = 0;
          var startIndex = pointIndex[index];
          var oldPoints = [];
          var newPoints = [];
          var count = 0;
          oldPoints.push(points[startIndex]);
          inPolygon && newPoints.push(points[startIndex]);
          index++;
          count++;
          startIndex++;
          while (count < points.length) {
            startIndex == points.length && (startIndex = 0);
            var p = points[startIndex];
            if (index >= 0 && startIndex == pointIndex[index]) {
              index++;
              index >= pointIndex.length && (index = 0);
              if (inPolygon) {
                newPoints.push(p);
                ret.push(newPoints);
                newPoints = [];
              } else {
                newPoints = [];
                newPoints.push(p);
              }
              oldPoints.push(p);
              inPolygon = !inPolygon;
            } else inPolygon ? newPoints.push(p) : oldPoints.push(p);
            startIndex++;
            count++;
          }
          if (inPolygon) if (!firstInPolygon && newPoints.length > 1) {
            newPoints.push(points[pointIndex[0]]);
            ret.push(newPoints);
          } else for (var i = 0; i < newPoints.length; ++i) oldPoints.push(newPoints[i]);
          ret.push(oldPoints);
        }
        return ret;
      };
      Plolygon.ab_cross_ac = function(a, b, c) {
        return this.cross(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y);
      };
      Plolygon.dot = function(x1, y1, x2, y2) {
        return x1 * x2 + y1 * y2;
      };
      Plolygon.cross = function(x1, y1, x2, y2) {
        return x1 * y2 - x2 * y1;
      };
      Plolygon.dblcmp = function(a, b) {
        if (Math.abs(a - b) <= 1e-6) return 0;
        return a > b ? 1 : -1;
      };
      return Plolygon;
    }();
    exports.Plolygon = Plolygon;
    cc._RF.pop();
  }, {} ],
  PolygonUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "915c5OYgLZILqLppqTC6Oti", "PolygonUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.PolygonUtil = void 0;
    var PolygonUtil = function() {
      function PolygonUtil() {}
      PolygonUtil.splitPolygonByLine = function(l0, l1, polygon, useDichotomy) {
        void 0 === useDichotomy && (useDichotomy = false);
        var result = [];
        for (var i = polygon.length - 1; i >= 0; i--) {
          var p0 = polygon[i], p1 = 0 == i ? polygon[polygon.length - 1] : polygon[i - 1];
          var _a = this.lineCrossPoint(p0, p1, l0, l1), n = _a[0], p = _a[1];
          if (-1 == n) continue;
          polygon.splice(i, -1, p);
          result.push(i + 1);
        }
        return result;
      };
      PolygonUtil.lineCrossPoint = function(p1, p2, q1, q2) {
        var a = p1, b = p2, c = q1, d = q2;
        var s1, s2, s3, s4;
        var d1, d2, d3, d4;
        var p = new cc.Vec2(0, 0);
        d1 = this.dblcmp(s1 = this.ab_cross_ac(a, b, c), 0);
        d2 = this.dblcmp(s2 = this.ab_cross_ac(a, b, d), 0);
        d3 = this.dblcmp(s3 = this.ab_cross_ac(c, d, a), 0);
        d4 = this.dblcmp(s4 = this.ab_cross_ac(c, d, b), 0);
        if (-2 == (d1 ^ d2) && -2 == (d3 ^ d4)) {
          p.x = (c.x * s2 - d.x * s1) / (s2 - s1);
          p.y = (c.y * s2 - d.y * s1) / (s2 - s1);
          return [ 0, p ];
        }
        if (0 == d1 && this.point_on_line(c, a, b) <= 0) {
          p = c;
          return [ 1, p ];
        }
        if (0 == d2 && this.point_on_line(d, a, b) <= 0) {
          p = d;
          return [ 1, p ];
        }
        if (0 == d3 && this.point_on_line(a, c, d) <= 0) {
          p = a;
          return [ 1, p ];
        }
        if (0 == d4 && this.point_on_line(b, c, d) <= 0) {
          p = b;
          return [ 1, p ];
        }
        return [ -1, null ];
      };
      PolygonUtil.isLineSegmentCross = function(P1, P2, Q1, Q2) {
        if (((Q1.x - P1.x) * (Q1.y - Q2.y) - (Q1.y - P1.y) * (Q1.x - Q2.x)) * ((Q1.x - P2.x) * (Q1.y - Q2.y) - (Q1.y - P2.y) * (Q1.x - Q2.x)) < 0 || ((P1.x - Q1.x) * (P1.y - P2.y) - (P1.y - Q1.y) * (P1.x - P2.x)) * ((P1.x - Q2.x) * (P1.y - P2.y) - (P1.y - Q2.y) * (P1.x - P2.x)) < 0) return true;
        return false;
      };
      PolygonUtil.point_on_line = function(a, p1, p2) {
        return this.dblcmp(this.dot(p1.x - a.x, p1.y - a.y, p2.x - a.x, p2.y - a.y), 0);
      };
      PolygonUtil.rayPointToLine = function(point, linePA, linePB) {
        var minX = Math.min(linePA.x, linePB.x);
        var maxX = Math.max(linePA.x, linePB.x);
        var minY = Math.min(linePA.y, linePB.y);
        var maxY = Math.max(linePA.y, linePB.y);
        if (point.y < minY || point.y > maxY || point.x > maxX) return -1;
        var x0 = linePA.x + (linePB.x - linePA.x) / (linePB.y - linePA.y) * (point.y - linePA.y);
        if (x0 > point.x) return 0;
        if (x0 == point.x) return 1;
        return -1;
      };
      PolygonUtil.relationPointToPolygon = function(point, polygon) {
        var count = 0;
        for (var i = 0; i < polygon.length; ++i) {
          if (polygon[i].equals(point)) return 2;
          var pa = polygon[i];
          var pb = polygon[0];
          i < polygon.length - 1 && (pb = polygon[i + 1]);
          var re = this.rayPointToLine(point, pa, pb);
          if (1 == re) return 1;
          0 == re && count++;
        }
        if (count % 2 == 0) return -1;
        return 0;
      };
      PolygonUtil.lineCutPolygon = function(pa, pb, polygon) {
        var ret = [];
        var points = [];
        var pointIndex = [];
        for (var i = 0; i < polygon.length; ++i) {
          points.push(polygon[i]);
          var a = polygon[i];
          var b = polygon[0];
          i < polygon.length - 1 && (b = polygon[i + 1]);
          var c = this.lineCrossPoint(pa, pb, a, b);
          if (0 == c[0]) {
            pointIndex.push(points.length);
            points.push(c[1]);
          } else c[0] > 0 && (c[1].equals(a) ? pointIndex.push(points.length - 1) : pointIndex.push(points.length));
        }
        if (pointIndex.length > 1) {
          var cp0 = points[pointIndex[0]];
          var cp1 = points[pointIndex[1]];
          var r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
          var inPolygon = r >= 0;
          if (pointIndex.length > 2 && cp0.sub(cp1).mag() > cp0.sub(points[pointIndex[pointIndex.length - 1]]).mag()) {
            cp1 = points[pointIndex[pointIndex.length - 1]];
            r = this.relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
            inPolygon = r < 0;
          }
          var firstInPolygon = inPolygon;
          var index = 0;
          var startIndex = pointIndex[index];
          var oldPoints = [];
          var newPoints = [];
          var count = 0;
          oldPoints.push(points[startIndex]);
          inPolygon && newPoints.push(points[startIndex]);
          index++;
          count++;
          startIndex++;
          while (count < points.length) {
            startIndex == points.length && (startIndex = 0);
            var p = points[startIndex];
            if (index >= 0 && startIndex == pointIndex[index]) {
              index++;
              index >= pointIndex.length && (index = 0);
              if (inPolygon) {
                newPoints.push(p);
                ret.push(newPoints);
                newPoints = [];
              } else {
                newPoints = [];
                newPoints.push(p);
              }
              oldPoints.push(p);
              inPolygon = !inPolygon;
            } else inPolygon ? newPoints.push(p) : oldPoints.push(p);
            startIndex++;
            count++;
          }
          if (inPolygon) if (!firstInPolygon && newPoints.length > 1) {
            newPoints.push(points[pointIndex[0]]);
            ret.push(newPoints);
          } else for (var i = 0; i < newPoints.length; ++i) oldPoints.push(newPoints[i]);
          ret.push(oldPoints);
        }
        return ret;
      };
      PolygonUtil.ab_cross_ac = function(a, b, c) {
        return this.cross(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y);
      };
      PolygonUtil.dot = function(x1, y1, x2, y2) {
        return x1 * x2 + y1 * y2;
      };
      PolygonUtil.cross = function(x1, y1, x2, y2) {
        return x1 * y2 - x2 * y1;
      };
      PolygonUtil.dblcmp = function(a, b) {
        if (Math.abs(a - b) <= 1e-6) return 0;
        return a > b ? 1 : -1;
      };
      return PolygonUtil;
    }();
    exports.PolygonUtil = PolygonUtil;
    cc._RF.pop();
  }, {} ],
  PoolManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "dcb7aJt11hII6HPIe2jXCHq", "PoolManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PoolManager = function() {
      function PoolManager() {
        this._dictPool = {};
        this._dictPrefab = {};
      }
      PoolManager.getInstance = function() {
        null === this._instance && (this._instance = new this());
        return this._instance;
      };
      Object.defineProperty(PoolManager, "instance", {
        get: function() {
          return this.getInstance();
        },
        enumerable: false,
        configurable: true
      });
      PoolManager.prototype.copyNode = function(copynode, parent) {
        var name = copynode.name;
        this._dictPrefab[name] = copynode;
        var node = null;
        if (this._dictPool.hasOwnProperty(name)) {
          var pool = this._dictPool[name];
          node = pool.size() > 0 ? pool.get() : cc.instantiate(copynode);
        } else {
          var pool = new cc.NodePool();
          this._dictPool[name] = pool;
          node = cc.instantiate(copynode);
        }
        if (parent) {
          node.parent = parent;
          node.active = true;
        }
        return node;
      };
      PoolManager.prototype.getNode = function(prefab, parent, pos) {
        var tempPre;
        var name;
        if ("string" === typeof prefab) {
          tempPre = this._dictPrefab[prefab];
          name = prefab;
          if (!tempPre) {
            console.log("Pool invalid prefab name = ", name);
            return null;
          }
        } else {
          tempPre = prefab;
          name = prefab.data.name;
        }
        var node = null;
        if (this._dictPool.hasOwnProperty(name)) {
          var pool = this._dictPool[name];
          node = pool.size() > 0 ? pool.get() : cc.instantiate(tempPre);
        } else {
          var pool = new cc.NodePool();
          this._dictPool[name] = pool;
          node = cc.instantiate(tempPre);
        }
        if (parent) {
          node.parent = parent;
          node.active = true;
          pos && (node.position = pos);
        }
        return node;
      };
      PoolManager.prototype.putNode = function(node, isActive) {
        void 0 === isActive && (isActive = false);
        if (!node) return;
        var name = node.name;
        var pool = null;
        if (this._dictPool.hasOwnProperty(name)) pool = this._dictPool[name]; else {
          pool = new cc.NodePool();
          this._dictPool[name] = pool;
        }
        pool.put(node);
      };
      PoolManager.prototype.clearPool = function(name) {
        if (this._dictPool.hasOwnProperty(name)) {
          var pool = this._dictPool[name];
          pool.clear();
        }
      };
      PoolManager.prototype.setPrefab = function(name, prefab) {
        this._dictPrefab[name] = prefab;
      };
      PoolManager.prototype.getPrefab = function(name) {
        return this._dictPrefab[name];
      };
      PoolManager._instance = null;
      return PoolManager;
    }();
    exports.default = PoolManager;
    cc._RF.pop();
  }, {} ],
  QwghManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c1fcfFgT4xG75JBlVJBsyO8", "QwghManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../core/Engine");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var QwghManager = function() {
      function QwghManager() {
        this.qwgh_currentGq = 0;
        this.qwgh_allGq = 0;
      }
      QwghManager.prototype.initData = function() {
        this.qwgh_currentGq = 0;
      };
      Object.defineProperty(QwghManager.prototype, "qwgh_currentGqGetFun", {
        get: function() {
          return this.qwgh_currentGq;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(QwghManager.prototype, "qwgh_currentGqSetFun", {
        set: function(index) {
          this.qwgh_currentGq = index;
        },
        enumerable: false,
        configurable: true
      });
      QwghManager.prototype.returnData = function() {
        var data = {
          qwgh_currentGq: this.qwgh_currentGq
        };
        return data;
      };
      QwghManager.prototype.saveLocalData = function() {
        var data = this.returnData();
        Engine_1.engine.storage.setItem("qwghGkData", data);
      };
      QwghManager.prototype.setData = function(data, Net) {
        data && (void 0 != data.gqCount ? this.qwgh_currentGq = data.qwgh_currentGq : this.qwgh_currentGq = 0);
      };
      QwghManager = __decorate([ ccclass ], QwghManager);
      return QwghManager;
    }();
    exports.default = QwghManager;
    cc._RF.pop();
  }, {
    "../../core/Engine": "Engine"
  } ],
  RandomManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "106860aJGlMHaR10MC+aXiX", "RandomManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RandomManager = void 0;
    var RandomManager = function() {
      function RandomManager() {}
      Object.defineProperty(RandomManager, "instance", {
        get: function() {
          null == this._instance && (this._instance = new RandomManager());
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      RandomManager.prototype.getRandom = function() {
        if (this.seedrandom) return this.seedrandom.quick();
        return Math.random();
      };
      RandomManager.prototype.setSeed = function(seed) {
        this.seedrandom = new Math.seedrandom(seed);
      };
      RandomManager.prototype.getRandomInt = function(min, max, type) {
        void 0 === type && (type = 2);
        min = Math.ceil(min);
        max = Math.floor(max);
        switch (type) {
         case 1:
          return Math.floor(this.getRandom() * (max - min)) + min;

         case 2:
          return Math.floor(this.getRandom() * (max - min + 1)) + min;

         case 3:
          return Math.floor(this.getRandom() * (max - min - 1)) + min + 1;
        }
        return 0;
      };
      RandomManager.prototype.getRandomByMinMaxList = function(min, max, n, type) {
        void 0 === type && (type = 2);
        var result = [];
        for (var i = 0; i < n; i++) result.push(this.getRandomInt(min, max));
        return result;
      };
      RandomManager.prototype.getRandomByObjectList = function(objects, n) {
        var temp = objects.slice();
        var result = [];
        for (var i = 0; i < n; i++) {
          var index = this.getRandomInt(0, n, 1);
          result.push(temp.splice(index, 1)[0]);
        }
        return result;
      };
      RandomManager.prototype.getRandomBySumList = function(n, sum) {
        var residue = sum;
        var value = 0;
        var result = [];
        for (var i = 0; i < n; i++) {
          value = this.getRandomInt(0, residue, 3);
          i == n - 1 ? value = residue : residue -= value;
          result.push(value);
        }
        return result;
      };
      return RandomManager;
    }();
    exports.RandomManager = RandomManager;
    cc._RF.pop();
  }, {} ],
  RedPointConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4e895mu4gNC3IXn4DOr5oCU", "RedPointConfig");
    "use strict";
    var _a;
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RedConfigData = exports.NodeNames = void 0;
    var NodeNames;
    (function(NodeNames) {
      NodeNames["Root"] = "Root";
      NodeNames["MailBox"] = "Root|MailBox";
      NodeNames["Mail"] = "Root|MailBox|Mail";
      NodeNames["Build"] = "Root|Build";
      NodeNames["BuildLevelUp"] = "Root|Build|BuildLevelUp";
      NodeNames["BuildGold"] = "Root|Build|BuildGold";
    })(NodeNames = exports.NodeNames || (exports.NodeNames = {}));
    exports.RedConfigData = (_a = {}, _a[NodeNames.Root] = {
      isNumber: true,
      isRepeat: false
    }, _a[NodeNames.MailBox] = {
      parent: NodeNames.Root,
      isNumber: true,
      isRepeat: false
    }, _a[NodeNames.Mail] = {
      parent: NodeNames.MailBox,
      isNumber: false,
      isRepeat: true
    }, _a[NodeNames.Build] = {
      parent: NodeNames.Root,
      isNumber: true,
      isRepeat: false
    }, _a[NodeNames.BuildLevelUp] = {
      parent: NodeNames.Build,
      isNumber: false,
      isRepeat: true
    }, _a[NodeNames.BuildGold] = {
      parent: NodeNames.Build,
      isNumber: false,
      isRepeat: true
    }, _a);
    cc._RF.pop();
  }, {} ],
  RedPoint: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ddd42oo+LlLhJe6PnU7Viv+", "RedPoint");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RedPoint = void 0;
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var COMPONENTTYPE;
    (function(COMPONENTTYPE) {
      COMPONENTTYPE[COMPONENTTYPE["NULL"] = 0] = "NULL";
      COMPONENTTYPE[COMPONENTTYPE["ROOT"] = 1] = "ROOT";
      COMPONENTTYPE[COMPONENTTYPE["PREFAB_BTN"] = 2] = "PREFAB_BTN";
      COMPONENTTYPE[COMPONENTTYPE["PREFAB"] = 3] = "PREFAB";
    })(COMPONENTTYPE || (COMPONENTTYPE = {}));
    var RedPoint = function(_super) {
      __extends(RedPoint, _super);
      function RedPoint() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      RedPoint = __decorate([ ccclass ], RedPoint);
      return RedPoint;
    }(cc.Component);
    exports.RedPoint = RedPoint;
    cc._RF.pop();
  }, {} ],
  RedPtNode: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6ded9ysjZBMnLV2FlNcjA3W", "RedPtNode");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RedPtNode = void 0;
    var RedPtNode = function() {
      function RedPtNode(name) {
        this.name = name;
        this.passCnt = 0;
        this.endCnt = 0;
        this.redPointCnt = 0;
        this.children = [];
        this.onUpdate = null;
        this.onCompetent = null;
        this.Object = null;
      }
      Object.defineProperty(RedPtNode.prototype, "name", {
        get: function() {
          return this._name;
        },
        set: function(value) {
          this._name = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "passCnt", {
        get: function() {
          return this._passCnt;
        },
        set: function(value) {
          this._passCnt = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "endCnt", {
        get: function() {
          return this._endCnt;
        },
        set: function(value) {
          this._endCnt = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "redPointCnt", {
        get: function() {
          return this._redPointCnt;
        },
        set: function(value) {
          this._redPointCnt = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "children", {
        get: function() {
          return this._childern;
        },
        set: function(value) {
          this._childern = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "onUpdate", {
        get: function() {
          return this._onUpdate;
        },
        set: function(value) {
          this._onUpdate = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "onCompetent", {
        get: function() {
          return this._onCompetent;
        },
        set: function(value) {
          this._onCompetent = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "onMinusUpdate", {
        get: function() {
          return this._onMinusUpdate;
        },
        set: function(value) {
          this._onMinusUpdate = value;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(RedPtNode.prototype, "Object", {
        get: function() {
          return this._Object;
        },
        set: function(value) {
          this._Object = value;
        },
        enumerable: false,
        configurable: true
      });
      return RedPtNode;
    }();
    exports.RedPtNode = RedPtNode;
    cc._RF.pop();
  }, {} ],
  RedPtTree: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cc183erc/xFMr8Ff6fpZ0SN", "RedPtTree");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RedPtTree = void 0;
    var RedPtNode_1 = require("./RedPtNode");
    var RedPtTree = function() {
      function RedPtTree() {
        this.configs = {};
        this.Root = new RedPtNode_1.RedPtNode("Root");
      }
      RedPtTree.prototype.init = function(config) {
        this.configs = config;
        for (var name in this.configs) {
          if (config[name].isRepeat) continue;
          this.InsertNode(name);
        }
      };
      RedPtTree.prototype.InsertNode = function(Model_name, title) {
        var config = this.configs[Model_name];
        var name = Model_name;
        if ("undefined" === typeof config) {
          cc.warn("\u6dfb\u52a0\u6b64" + Model_name + "\u6a21\u5757\u7ea2\u70b9\u63d0\u793a\u5931\u8d25,\u914d\u7f6e\u4fe1\u606f\u4e0d\u5b58\u5728");
          return;
        }
        if (config.isRepeat && title) name = name + "_&" + title; else if (this.SearchNode(name)) return;
        var node = this.Root;
        node.passCnt = node.passCnt + 1;
        var pathList = name.split("|");
        for (var _i = 0, pathList_1 = pathList; _i < pathList_1.length; _i++) {
          var path = pathList_1[_i];
          node.children[path] || (node.children[path] = new RedPtNode_1.RedPtNode(path));
          node = node.children[path];
          node.passCnt = node.passCnt + 1;
        }
        node.endCnt = node.endCnt + 1;
      };
      RedPtTree.prototype.SearchNode = function(name) {
        if (!name) return null;
        var node = this.Root;
        var pathList = name.split("|");
        for (var _i = 0, pathList_2 = pathList; _i < pathList_2.length; _i++) {
          var path = pathList_2[_i];
          if (null === node.children[path] || void 0 === node.children[path]) return null;
          node = node.children[path];
        }
        if (node.endCnt > 0) return node;
        return null;
      };
      RedPtTree.prototype.deleteNode = function(model_name, title) {
        var config = this.configs[model_name];
        var name = model_name;
        config.isRepeat && title && (name = name + "_&" + title);
        if (!this.SearchNode(name)) return;
        var node = this.Root;
        node.passCnt = node.passCnt - 1;
        var pathList = name.split("|");
        for (var _i = 0, pathList_3 = pathList; _i < pathList_3.length; _i++) {
          var path = pathList_3[_i];
          var childNode = node.children[path];
          childNode.passCnt = childNode.passCnt - 1;
          if (0 == childNode.passCnt) {
            "function" === typeof node.children[path].onCompetent && node.children[path].onCompetent().call(node.Object);
            this.ChangeRedPointCnt(name, -999);
            node.children[path] = null;
            return;
          }
          node = childNode;
        }
        node.endCnt = node.endCnt - 1;
      };
      RedPtTree.prototype.ChangeRedPointCnt = function(model_name, title, delta) {
        var config = this.configs[model_name];
        var name = model_name;
        var item = delta;
        "string" === typeof title ? config.isRepeat && title && (name = name + "_&" + title) : item = title;
        var targetNode = this.SearchNode(name);
        if (null == targetNode) return;
        item < 0 && targetNode.redPointCnt + item < 0 && (item = -targetNode.redPointCnt);
        var node = this.Root;
        var pathList = name.split("|");
        if (item > 0) for (var _i = 0, pathList_4 = pathList; _i < pathList_4.length; _i++) {
          var path = pathList_4[_i];
          var childNode = node.children[path];
          childNode.redPointCnt = childNode.redPointCnt + item;
          node = childNode;
          node.onUpdate && node.onUpdate.call(node.Object, node.redPointCnt, node.Object);
        } else if (item < 0) for (var _a = 0, pathList_5 = pathList; _a < pathList_5.length; _a++) {
          var path = pathList_5[_a];
          var childNode = node.children[path];
          childNode.redPointCnt = childNode.redPointCnt + item;
          node = childNode;
          node.onMinusUpdate && node.onMinusUpdate.call(node.Object, node.redPointCnt, node.Object);
        }
      };
      RedPtTree.prototype.setCallBack = function(model_name, title, callback, competent, thisObj) {
        var config = this.configs[model_name];
        var name = model_name;
        var obj = thisObj;
        var cb = callback;
        var cp = competent;
        if ("string" === typeof title) {
          config.isRepeat && title && (name = name + "_&" + title);
          "function" !== typeof competent && (obj = competent);
        } else {
          cb = title;
          if ("object" === typeof callback) obj = callback; else {
            obj = competent;
            cp = callback;
          }
        }
        var node = this.SearchNode(name);
        if (null == node) return;
        node.onUpdate = cb;
        node.onCompetent = cp;
        node.Object = obj;
      };
      RedPtTree.prototype.setMinusUpdate = function(onMinusUpdate, model_name, title) {
        var name = model_name;
        var config = this.configs[model_name];
        "string" === typeof title && config.isRepeat && title && (name = name + "_&" + title);
        var node = this.SearchNode(name);
        node.onMinusUpdate = onMinusUpdate;
      };
      RedPtTree.prototype.GetRedpointCnt = function(model_name, title) {
        var config = this.configs[model_name];
        var name = model_name;
        config.isRepeat && title && (name = name + "_&" + title);
        var node = this.SearchNode(name);
        if (null == node) return 0;
        return node.redPointCnt;
      };
      return RedPtTree;
    }();
    exports.RedPtTree = RedPtTree;
    cc._RF.pop();
  }, {
    "./RedPtNode": "RedPtNode"
  } ],
  RegexUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "5bd20Ii9P9L1qUIvan9eHu+", "RegexUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var RegexUtil = function() {
      function RegexUtil() {}
      RegexUtil.isDWORD = function(string) {
        return /[^\x00-\xff]/.test(string);
      };
      return RegexUtil;
    }();
    exports.default = RegexUtil;
    cc._RF.pop();
  }, {} ],
  ResLoader: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b3499L802hOep0M6K/uQyEU", "ResLoader");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.resLoader = void 0;
    var ResLoader = function() {
      function ResLoader() {}
      ResLoader.prototype.loadBundle = function(url, v) {
        return new Promise(function(resolve, reject) {
          cc.assetManager.loadBundle(url, {
            version: v
          }, function(err, bundle) {
            if (err) return cc.error(err);
            resolve(bundle);
          });
        });
      };
      ResLoader.prototype.parseLoadResArgs = function(paths, type, onProgress, onComplete) {
        var pathsOut = paths;
        var typeOut = type;
        var onProgressOut = onProgress;
        var onCompleteOut = onComplete;
        if (void 0 === onComplete) {
          var isValidType = cc.js.isChildClassOf(type, cc.Asset);
          if (onProgress) {
            onCompleteOut = onProgress;
            isValidType && (onProgressOut = null);
          } else if (void 0 === onProgress && !isValidType) {
            onCompleteOut = type;
            onProgressOut = null;
            typeOut = null;
          }
          if (void 0 !== onProgress && !isValidType) {
            onProgressOut = type;
            typeOut = null;
          }
        }
        return {
          paths: pathsOut,
          type: typeOut,
          onProgress: onProgressOut,
          onComplete: onCompleteOut
        };
      };
      ResLoader.prototype.loadByBundleAndArgs = function(bundle, args) {
        args.dir ? bundle.loadDir(args.paths, args.type, args.onProgress, args.onComplete) : ("string" == typeof args.paths, 
        bundle.load(args.paths, args.type, args.onProgress, args.onComplete));
      };
      ResLoader.prototype.loadByArgs = function(args) {
        var _this = this;
        if (args.bundle) if (cc.assetManager.bundles.has(args.bundle)) {
          var bundle = cc.assetManager.bundles.get(args.bundle);
          this.loadByBundleAndArgs(bundle, args);
        } else cc.assetManager.loadBundle(args.bundle, function(err, bundle) {
          err || _this.loadByBundleAndArgs(bundle, args);
        }); else this.loadByBundleAndArgs(cc.resources, args);
      };
      ResLoader.prototype.load = function(bundleName, paths, type, onProgress, onComplete) {
        var args = null;
        if ("string" === typeof paths || paths instanceof Array) {
          args = this.parseLoadResArgs(paths, type, onProgress, onComplete);
          args.bundle = bundleName;
        } else args = this.parseLoadResArgs(bundleName, paths, type, onProgress);
        this.loadByArgs(args);
      };
      ResLoader.prototype.loadDir = function(bundleName, dir, type, onProgress, onComplete) {
        var args = null;
        if ("string" === typeof dir) {
          args = this.parseLoadResArgs(dir, type, onProgress, onComplete);
          args.bundle = bundleName;
        } else args = this.parseLoadResArgs(bundleName, dir, type, onProgress);
        args.dir = args.paths;
        this.loadByArgs(args);
      };
      ResLoader.prototype.loadRemote = function(node, url, completeBack) {
        if (!url) return;
        var showcion = function(pathUrl) {
          if (!node) return;
          if (!node.children) return;
          if (pathUrl) cc.assetManager.loadRemote(pathUrl, {
            ext: ".jpg"
          }, function(err, texture) {
            if (err) {
              completeBack && completeBack(false, null);
              console.log(err);
              console.log("\u4e0b\u8f7d\u62a5\u9519==========");
              return;
            }
            var spriteFrame = new cc.SpriteFrame();
            spriteFrame.setTexture(texture);
            node.getComponent(cc.Sprite).spriteFrame = spriteFrame;
            node.getComponent(cc.Sprite).type = cc.Sprite.Type.SIMPLE;
            node.getComponent(cc.Sprite).sizeMode = cc.Sprite.SizeMode.CUSTOM;
            completeBack && completeBack(true, spriteFrame);
          }); else {
            console.log("\u4e0d\u5b58\u5728showRemoteImageURL:", pathUrl);
            node.getComponent(cc.Sprite).type = cc.Sprite.Type.SIMPLE;
            node.getComponent(cc.Sprite).sizeMode = cc.Sprite.SizeMode.CUSTOM;
            completeBack && completeBack(false, null);
          }
          console.log("pathUrl========" + pathUrl);
        };
        cc.sys.isNative || showcion.bind(this)(url);
      };
      ResLoader.prototype.release = function(bundleName) {
        void 0 === bundleName && (bundleName = "resources");
        var bundle = cc.assetManager.getBundle(bundleName);
        null === bundle || void 0 === bundle ? void 0 : bundle.releaseAll();
      };
      ResLoader.prototype.releaseDir = function(path, bundleName) {
        void 0 === bundleName && (bundleName = "resources");
        var bundle = cc.assetManager.getBundle(bundleName);
        var infos = null === bundle || void 0 === bundle ? void 0 : bundle.getDirWithPath(path);
        null === infos || void 0 === infos ? void 0 : infos.map(function(info) {
          null === bundle || void 0 === bundle ? void 0 : bundle.release(info.path);
        });
        "" == path && "resources" != bundleName && bundle && cc.assetManager.removeBundle(bundle);
      };
      ResLoader.prototype.get = function(path, type, bundleName) {
        void 0 === bundleName && (bundleName = "resources");
        var bundle = cc.assetManager.getBundle(bundleName);
        return bundle.get(path, type);
      };
      ResLoader.prototype.fishframbundleload = function(path, callback, type, bundleName) {
        void 0 === type && (type = null);
        void 0 === bundleName && (bundleName = "fishfarm");
        var bundle = null;
        bundleName && (bundle = cc.assetManager.getBundle(bundleName));
        bundle && (type ? bundle.load(path, type, callback) : bundle.load(path, callback));
      };
      ResLoader.prototype.dump = function() {
        cc.assetManager.assets.forEach(function(value, key) {
          console.log(key);
        });
        console.log("\u5f53\u524d\u8d44\u6e90\u603b\u6570:" + cc.assetManager.assets.count);
      };
      return ResLoader;
    }();
    exports.default = ResLoader;
    exports.resLoader = new ResLoader();
    cc._RF.pop();
  }, {} ],
  Root: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "bd252OpyGdAmKhyJbGtxRv1", "Root");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Root = void 0;
    var Config_1 = require("../game/common/config/Config");
    var EngineMessage_1 = require("./common/event/EngineMessage");
    var MessageManager_1 = require("./common/event/MessageManager");
    var Engine_1 = require("./Engine");
    var GUI_1 = require("./gui/GUI");
    var SingletonModuleComp_1 = require("../game/SingletonModuleComp");
    var Initialize_1 = require("./Initialize/Initialize");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Root = function(_super) {
      __extends(Root, _super);
      function Root() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.game = null;
        _this.gui = null;
        _this.OtherNode = null;
        _this.c_gui = null;
        return _this;
      }
      Root.prototype.onLoad = function() {
        Engine_1.engine.init(this);
        this.init();
        this.singletonModule = SingletonModuleComp_1.default.Instance;
        Config_1.config.init(this.run.bind(this));
      };
      Root.prototype.run = function() {
        SingletonModuleComp_1.SingletonModule.initialize = new Initialize_1.Initialize();
      };
      Root.prototype.init = function() {
        var _a;
        this.c_gui = null === (_a = this.gui) || void 0 === _a ? void 0 : _a.addComponent(GUI_1.GUI);
        var data = localStorage.getItem("set");
        data = data ? JSON.parse(data) : data;
        if (data) {
          Engine_1.engine.audio.setSwitchMusic(data.Music);
          Engine_1.engine.audio.setSwitchEffect(data.SoundEffect);
        }
        cc.game.on(cc.game.EVENT_SHOW, function() {
          cc.log("Game.EVENT_SHOW");
          Engine_1.engine.timer.load();
          Engine_1.engine.audio.resumeAll();
          cc.director.resume();
          MessageManager_1.Message.dispatchEvent(EngineMessage_1.EngineMessage.GAME_ENTER);
          var data = localStorage.getItem("set");
          data = data ? JSON.parse(data) : data;
          if (data) {
            Engine_1.engine.audio.setSwitchMusic(data.Music);
            Engine_1.engine.audio.setSwitchEffect(data.SoundEffect);
          }
        });
        cc.game.on(cc.game.EVENT_HIDE, function() {
          cc.log("Game.EVENT_HIDE");
          Engine_1.engine.timer.save();
          Engine_1.engine.audio.pauseAll();
          cc.director.pause();
          cc.game.pause();
          MessageManager_1.Message.dispatchEvent(EngineMessage_1.EngineMessage.GAME_EXIT);
        });
        var self = this;
        cc.view.setResizeCallback(function() {
          self.c_gui.resize();
          MessageManager_1.Message.dispatchEvent(EngineMessage_1.EngineMessage.GAME_RESIZE);
        });
      };
      __decorate([ property({
        type: cc.Node,
        tooltip: "\u6e38\u620f\u5c42"
      }) ], Root.prototype, "game", void 0);
      __decorate([ property({
        type: cc.Node,
        tooltip: "\u754c\u9762\u5c42"
      }) ], Root.prototype, "gui", void 0);
      __decorate([ property(cc.Node) ], Root.prototype, "OtherNode", void 0);
      Root = __decorate([ ccclass ], Root);
      return Root;
    }(cc.Component);
    exports.Root = Root;
    cc._RF.pop();
  }, {
    "../game/SingletonModuleComp": "SingletonModuleComp",
    "../game/common/config/Config": "Config",
    "./Engine": "Engine",
    "./Initialize/Initialize": "Initialize",
    "./common/event/EngineMessage": "EngineMessage",
    "./common/event/MessageManager": "MessageManager",
    "./gui/GUI": "GUI"
  } ],
  RotateUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "916d0XduzFArLL7oBTNnkqd", "RotateUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.RotateUtil = void 0;
    var Vec3Util_1 = require("./Vec3Util");
    var RotateUtil = function() {
      function RotateUtil() {}
      RotateUtil.rotateAround = function(target, axis, rad) {
        var quat = new Quat();
        Quat.rotateAround(quat, target.getRotation(), axis.normalize(), rad);
        target.setRotation(quat);
      };
      RotateUtil.rotateAroundTarget = function(lookAt, target, axis, rad) {
        var point_lookAt = lookAt.worldPosition;
        var point_target = target.worldPosition;
        var quat = new Quat();
        var vec3 = new cc.Vec3();
        Quat.fromAxisAngle(quat, axis, rad);
        cc.Vec3.subtract(vec3, point_target, point_lookAt);
        cc.Vec3.transformQuat(vec3, vec3, quat);
        cc.Vec3.add(vec3, point_lookAt, vec3);
        target.setWorldPosition(vec3);
        Quat.rotateAround(quat, target.worldRotation, axis, rad);
        Quat.normalize(quat, quat);
        target.setWorldRotation(quat);
      };
      RotateUtil.circularEdgePosition = function(center, radius, angle) {
        var edge = Vec3Util_1.Vec3Util.z.multiplyScalar(radius);
        var dir = Vec3Util_1.Vec3Util.sub(edge, center);
        var vec3 = new cc.Vec3();
        var quat = new Quat();
        Quat.fromAxisAngle(quat, cc.Vec3.UP, toRadian(angle));
        cc.Vec3.transformQuat(vec3, dir, quat);
        cc.Vec3.add(vec3, center, vec3);
        return vec3;
      };
      return RotateUtil;
    }();
    exports.RotateUtil = RotateUtil;
    cc._RF.pop();
  }, {
    "./Vec3Util": "Vec3Util"
  } ],
  SceneConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f08ecZO6zNK/JODW2HinngE", "SceneConfig");
    "use strict";
    var _a;
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SceneConfigDate = exports.sceneType = exports.SceneUIID = void 0;
    var SceneUIID;
    (function(SceneUIID) {
      SceneUIID[SceneUIID["Game2Scene"] = 1] = "Game2Scene";
    })(SceneUIID = exports.SceneUIID || (exports.SceneUIID = {}));
    var sceneType;
    (function(sceneType) {
      sceneType["Get"] = "LayerGet";
      sceneType["Open"] = "LayerOpen";
      sceneType["Previous"] = "LayerPrevious";
    })(sceneType = exports.sceneType || (exports.sceneType = {}));
    exports.SceneConfigDate = (_a = {}, _a[SceneUIID.Game2Scene] = {
      bundle: "scene",
      layer: sceneType.Open,
      Scenefile: "Game2Scene"
    }, _a);
    cc._RF.pop();
  }, {} ],
  Screw: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "cf48f43BORHH5JFAqmG4RZ9", "Screw");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var pro_screwlevel_1 = require("./pro_screwlevel");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var Screw = function(_super) {
      __extends(Screw, _super);
      function Screw() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._isUp = false;
        _this.sprite = null;
        _this.up = null;
        return _this;
      }
      Object.defineProperty(Screw.prototype, "isUp", {
        get: function() {
          return this._isUp;
        },
        set: function(value) {
          this._isUp = value;
          this.sprite.enabled = !value;
          this.up.active = value;
          pro_screwlevel_1.default.instance.CurScrew = value ? this : null;
        },
        enumerable: false,
        configurable: true
      });
      Screw.prototype.onLoad = function() {
        var _this = this;
        this.sprite = this.getComponent(cc.Sprite);
        this.up = this.node.children[0];
        this.node.on(cc.Node.EventType.TOUCH_START, function() {
          var screw = pro_screwlevel_1.default.instance.CurScrew;
          screw && screw != _this && (screw.isUp = false);
          _this.isUp = !_this.isUp;
        }, this);
        this.up.on(cc.Node.EventType.TOUCH_START, function() {
          _this.isUp = !_this.isUp;
        }, this);
      };
      Screw.prototype.start = function() {};
      Screw.prototype.move = function(hole, boardJoints) {
        var _this = this;
        void 0 === boardJoints && (boardJoints = []);
        var joints = this.node.getComponents(cc.RevoluteJoint);
        for (var i = 0; i < joints.length; i++) {
          var element = joints[i];
          element.destroy();
        }
        this.isUp = false;
        this.node.position = hole.node.position;
        boardJoints.forEach(function(element) {
          var revoluteJoint = _this.node.addComponent(cc.RevoluteJoint);
          revoluteJoint.collideConnected = false;
          revoluteJoint.connectedBody = element.parent.getComponent(cc.RigidBody);
          revoluteJoint.connectedAnchor = cc.v2(element.position.x, element.position.y);
          revoluteJoint.apply();
        });
      };
      Screw = __decorate([ ccclass ], Screw);
      return Screw;
    }(cc.Component);
    exports.default = Screw;
    cc._RF.pop();
  }, {
    "./pro_screwlevel": "pro_screwlevel"
  } ],
  SingletonModuleComp: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "992cfjm4jxHLKrxjlARBOOT", "SingletonModuleComp");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SingletonModule = void 0;
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var SingletonModuleComp = function() {
      function SingletonModuleComp() {
        this.initialize = null;
        this.account = null;
        this.login = null;
      }
      SingletonModuleComp_1 = SingletonModuleComp;
      Object.defineProperty(SingletonModuleComp, "Instance", {
        get: function() {
          if (this._Instance) return this._Instance;
          this._Instance = new SingletonModuleComp_1();
          return this._Instance;
        },
        enumerable: false,
        configurable: true
      });
      var SingletonModuleComp_1;
      SingletonModuleComp._Instance = null;
      SingletonModuleComp = SingletonModuleComp_1 = __decorate([ ccclass ], SingletonModuleComp);
      return SingletonModuleComp;
    }();
    exports.default = SingletonModuleComp;
    exports.SingletonModule = SingletonModuleComp.Instance;
    cc._RF.pop();
  }, {} ],
  StringFormat: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4f203OtOHZOkI1YxIO7bWvR", "StringFormat");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.StringFormatFunction = void 0;
    var StringFormat = function() {
      function StringFormat() {}
      StringFormat.prototype.deal = function(value, format) {
        if ("" === format) return value;
        format = format.toLowerCase().trim();
        var match_func = format.match(/^[a-z|A-Z]+/gi);
        var match_num = format.match(/\d+$/gi);
        var func = "";
        var num = 0;
        var res = "";
        match_func && (func = match_func[0]);
        match_num && (num = parseInt(match_num[0]));
        if ("number" == typeof value) switch (func) {
         case "int":
          res = this.int(value);
          break;

         case "fix":
          res = this.fix(value, num);
          break;

         case "kmbt":
          res = this.KMBT(value);
          break;

         case "per":
          res = this.per(value, num);
          break;

         case "sep":
          res = this.sep(value);
        } else {
          switch (func) {
           case "limit":
            res = this.limit(value, num);
          }
          res = value;
        }
        return res;
      };
      StringFormat.prototype.sep = function(value) {
        var num = Math.round(value).toString();
        return num.replace(new RegExp("(\\d)(?=(\\d{3})+$)", "ig"), "$1,");
      };
      StringFormat.prototype.time_m = function(value) {};
      StringFormat.prototype.time_s = function(value) {};
      StringFormat.prototype.time_ms = function(value) {};
      StringFormat.prototype.timeStamp = function(value) {
        return new Date(value).toString();
      };
      StringFormat.prototype.per = function(value, fd) {
        return Math.round(100 * value).toFixed(fd);
      };
      StringFormat.prototype.int = function(value) {
        return Math.round(value);
      };
      StringFormat.prototype.fix = function(value, fd) {
        return value.toFixed(fd);
      };
      StringFormat.prototype.limit = function(value, count) {
        return value.substring(0, count);
      };
      StringFormat.prototype.KMBT = function(value, lang) {
        void 0 === lang && (lang = "en");
        var counts = [ 1e3, 1e6, 1e9, 1e12 ];
        var units = [ "", "K", "M", "B", "T" ];
        switch (lang) {
         case "zh":
          var counts_1 = [ 1e4, 1e8, 1e12, 1e16 ];
          var units_1 = [ "", "\u4e07", "\u4ebf", "\u5146", "\u4eac" ];
        }
        return this.compressUnit(value, counts, units, 2);
      };
      StringFormat.prototype.compressUnit = function(value, valueArr, unitArr, fixNum) {
        void 0 === fixNum && (fixNum = 2);
        var counts = valueArr;
        var units = unitArr;
        var res = "";
        var index;
        for (index = 0; index < counts.length; index++) {
          var e = counts[index];
          if (value < e) {
            res = index > 0 ? (value / counts[index - 1]).toFixed(fixNum) : value.toFixed(0);
            break;
          }
        }
        return res + units[index];
      };
      return StringFormat;
    }();
    exports.StringFormatFunction = new StringFormat();
    cc._RF.pop();
  }, {} ],
  StringUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d8b45BAWq1C4oHxZgbjlvW3", "StringUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.StringUtil = void 0;
    var StringUtil = function() {
      function StringUtil() {}
      StringUtil.numberTotPermil = function(num) {
        return num.toLocaleString();
      };
      StringUtil.numberToThousand = function(value, fixed) {
        void 0 === fixed && (fixed = 2);
        var k = 1e3;
        var bool = true;
        if (value < 0) {
          value = Math.abs(value);
          bool = false;
        }
        var sizes = [ "", "K", "M", "G", "T", "P", "E", "Z", "Y", "B", "N", "D" ];
        if (value < k) return value.toString();
        var i = Math.floor(Math.log(value) / Math.log(k));
        var r = bool ? value / Math.pow(k, i) : -value / Math.pow(k, i);
        i >= sizes.length && (sizes[i] = "?");
        return r.toFixed(fixed) + sizes[i];
      };
      StringUtil.numberToTenThousand = function(value, fixed) {
        void 0 === fixed && (fixed = 2);
        var k = 1e4;
        var sizes = [ "", "\u4e07", "\u4ebf", "\u4e07\u4ebf" ];
        if (value < k) return value.toString();
        var i = Math.floor(Math.log(value) / Math.log(k));
        return (value / Math.pow(k, i)).toFixed(fixed) + sizes[i];
      };
      StringUtil.weightNormalization = function(value) {
        var k = [ 0, 50, 500, 5e6 ];
        var sizes = [ "\u514b", "\u4e24", "\u65a4", "\u4e07\u65a4" ];
        if (value <= 0) return "0\u514b";
        var str = "";
        var remainValue = value;
        if (remainValue / k[3] > 1) {
          str += Math.floor(remainValue / k[3]) + sizes[3];
          remainValue %= k[3];
        }
        if (remainValue / k[2] > 1) {
          str += Math.floor(remainValue / k[2]) + sizes[2];
          remainValue %= k[2];
        }
        if (remainValue / k[1] > 1) {
          str += Math.floor(remainValue / k[1]) + sizes[1];
          remainValue %= k[1];
        }
        remainValue > 0 && (str += remainValue.toFixed(0) + sizes[0]);
        return str;
      };
      StringUtil.format = function(date, fmt) {
        var o = {
          "M+": date.getMonth() + 1,
          "d+": date.getDate(),
          "h+": date.getHours(),
          "m+": date.getMinutes(),
          "s+": date.getSeconds(),
          "q+": Math.floor((date.getMonth() + 3) / 3),
          S: date.getMilliseconds()
        };
        /(y+)/.test(fmt) && (fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var k in o) new RegExp("(" + k + ")").test(fmt) && (fmt = fmt.replace(RegExp.$1, 1 == RegExp.$1.length ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
      };
      StringUtil.numberToformat = function(num, fmt) {
        void 0 === fmt && (fmt = "{0}\u65f6{1}\u5206{2}\u79d2");
        var displayTime = num;
        var hours = Math.floor(displayTime % 86400 / 3600);
        var minutes = Math.floor(displayTime % 86400 % 3600 / 60);
        var seconds = Math.floor(displayTime % 86400 % 3600 % 60 % 60);
        var time_Format = fmt;
        var format = [ hours + "", minutes + "", seconds + "" ];
        var timeFormat = time_Format.replace(/\{(\d+)\}/g, function(m, i) {
          var realIndex = Number(i) + 3 - time_Format.length / 4;
          return Number(format[realIndex]) < 10 ? "0" + format[realIndex] : format[realIndex];
        });
        return timeFormat;
      };
      StringUtil.numberToTime = function(num) {
        var displayTime = num;
        var hours = Math.floor(displayTime % 86400 / 3600);
        var minutes = Math.floor(displayTime % 86400 % 3600 / 60);
        var seconds = Math.floor(displayTime % 86400 % 3600 % 60 % 60);
        var time_Format = "";
        time_Format += hours > 0 ? hours >= 10 ? hours + ":" : "0" + hours + ":" : "00:";
        time_Format += minutes > 0 ? minutes >= 10 ? minutes + ":" : "0" + minutes + ":" : "00:";
        time_Format += seconds > 0 ? seconds >= 10 ? "" + seconds : "0" + seconds : "00";
        return time_Format;
      };
      StringUtil.stringToArray1 = function(str) {
        if ("" == str) return [];
        return str.split(",");
      };
      StringUtil.stringToArray2 = function(str) {
        if ("" == str) return [];
        return str.split("|");
      };
      StringUtil.stringToArray3 = function(str) {
        if ("" == str) return [];
        return str.split(":");
      };
      StringUtil.stringToArray4 = function(str) {
        if ("" == str) return [];
        return str.split(";");
      };
      StringUtil.sub = function(str, n, showdot) {
        void 0 === showdot && (showdot = false);
        var r = /[^\x00-\xff]/g;
        if (str.replace(r, "mm").length <= n) return str;
        var m = Math.floor(n / 2);
        for (var i = m; i < str.length; i++) if (str.substr(0, i).replace(r, "mm").length >= n) return showdot ? str.substr(0, i) + "..." : str.substr(0, i);
        return str;
      };
      StringUtil.stringLen = function(str) {
        var realLength = 0, len = str.length, charCode = -1;
        for (var i = 0; i < len; i++) {
          charCode = str.charCodeAt(i);
          realLength += charCode >= 0 && charCode <= 128 ? 1 : 2;
        }
        return realLength;
      };
      return StringUtil;
    }();
    exports.StringUtil = StringUtil;
    cc._RF.pop();
  }, {} ],
  SysDefine: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "3a368cy1vJJfKL8xmA2eWiv", "SysDefine");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SysDefine = exports.UIState = exports.ModalOpacity = exports.FormType = void 0;
    var FormType;
    (function(FormType) {
      FormType[FormType["Screen"] = 0] = "Screen";
      FormType[FormType["FixedUI"] = 1] = "FixedUI";
      FormType[FormType["PopUp"] = 2] = "PopUp";
      FormType[FormType["TopTips"] = 3] = "TopTips";
    })(FormType = exports.FormType || (exports.FormType = {}));
    var ModalOpacity;
    (function(ModalOpacity) {
      ModalOpacity[ModalOpacity["None"] = 0] = "None";
      ModalOpacity[ModalOpacity["OpacityZero"] = 1] = "OpacityZero";
      ModalOpacity[ModalOpacity["OpacityLow"] = 2] = "OpacityLow";
      ModalOpacity[ModalOpacity["OpacityHalf"] = 3] = "OpacityHalf";
      ModalOpacity[ModalOpacity["OpacityHigh"] = 4] = "OpacityHigh";
      ModalOpacity[ModalOpacity["OpacityFull"] = 5] = "OpacityFull";
    })(ModalOpacity = exports.ModalOpacity || (exports.ModalOpacity = {}));
    var UIState;
    (function(UIState) {
      UIState[UIState["None"] = 0] = "None";
      UIState[UIState["Loading"] = 1] = "Loading";
      UIState[UIState["Showing"] = 2] = "Showing";
      UIState[UIState["Hiding"] = 3] = "Hiding";
    })(UIState = exports.UIState || (exports.UIState = {}));
    var SysDefine = function() {
      function SysDefine() {}
      SysDefine.SYS_PATH_CANVAS = "Canvas";
      SysDefine.SYS_PATH_UIFORMS_CONFIG_INFO = "UIFormsConfigInfo";
      SysDefine.SYS_PATH_CONFIG_INFO = "SysConfigInfo";
      SysDefine.SYS_UIROOT_NAME = "Canvas/Scene/UIROOT";
      SysDefine.SYS_UIMODAL_NAME = "Canvas/Scene/UIROOT/UIModalManager";
      SysDefine.SYS_UIAdapter_NAME = "Canvas/Scene/UIROOT/UIAdapterManager";
      SysDefine.SYS_SCREEN_NODE = "Screen";
      SysDefine.SYS_FIXEDUI_NODE = "FixedUI";
      SysDefine.SYS_POPUP_NODE = "PopUp";
      SysDefine.SYS_TOPTIPS_NODE = "TopTips";
      SysDefine.SYS_STANDARD_Prefix = "_";
      SysDefine.SYS_STANDARD_Separator = "$";
      SysDefine.SYS_STANDARD_End = "#";
      SysDefine.UI_PATH_ROOT = "UIForms/";
      SysDefine.SeparatorMap = {
        _Node: "cc.Node",
        _Label: "cc.Label",
        _Button: "cc.Button",
        _Sprite: "cc.Sprite",
        _RichText: "cc.RichText",
        _Mask: "cc.Mask",
        _MotionStreak: "cc.MotionStreak",
        _TiledMap: "cc.TiledMap",
        _TiledTile: "cc.TiledTile",
        _Spine: "sp.Skeleton",
        _Graphics: "cc.Graphics",
        _Animation: "cc.Animation",
        _WebView: "cc.WebView",
        _EditBox: "cc.EditBox",
        _ScrollView: "cc.ScrollView",
        _VideoPlayer: "cc.VideoPlayer",
        _ProgressBar: "cc.ProgressBar",
        _PageView: "cc.PageView",
        _Slider: "cc.Slider",
        _Toggle: "cc.Toggle",
        _ButtonPlus: "ButtonPlus"
      };
      return SysDefine;
    }();
    exports.SysDefine = SysDefine;
    cc._RF.pop();
  }, {} ],
  TLManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "182b7evRLVGuZPEpx1FuMLg", "TLManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var TLManager = function() {
      function TLManager() {}
      TLManager.prototype.initData = function() {};
      TLManager.prototype.addTLValue = function(num) {};
      TLManager.prototype.ADaddTLValue = function(num) {};
      TLManager.prototype.reduceTLValue = function(num) {};
      TLManager.prototype.returnData = function() {};
      TLManager.prototype.saveLocalData = function() {};
      TLManager.prototype.setData = function(data, Net) {};
      TLManager = __decorate([ ccclass ], TLManager);
      return TLManager;
    }();
    exports.default = TLManager;
    cc._RF.pop();
  }, {} ],
  TextureAssemblerNew: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "60e7dODg9BLMr1/uDYkvc0U", "TextureAssemblerNew");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CommonUtilsNew_1 = require("./CommonUtilsNew");
    var gfx = cc["gfx"];
    var vfmtPosUvColor = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    } ]);
    var TextureAssemblerNew = function(_super) {
      __extends(TextureAssemblerNew, _super);
      function TextureAssemblerNew() {
        var _this = _super.call(this) || this;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.floatsPerVert = 5;
        _this.uvOffset = 2;
        _this.colorOffset = 4;
        _this.indicesArr = [];
        _this._renderData = null;
        _this._renderData = new cc.RenderData();
        _this._renderData.init(_this);
        _this.initData();
        return _this;
      }
      Object.defineProperty(TextureAssemblerNew.prototype, "verticesFloats", {
        get: function() {
          return this.verticesCount * this.floatsPerVert;
        },
        enumerable: false,
        configurable: true
      });
      TextureAssemblerNew.prototype.getVfmt = function() {
        return vfmtPosUvColor;
      };
      TextureAssemblerNew.prototype.getBuffer = function() {
        return cc.renderer["_handle"].getBuffer("mesh", this.getVfmt());
      };
      TextureAssemblerNew.prototype.initData = function() {
        var data = this._renderData;
        data.createQuadData(0, this.verticesFloats, this.indicesCount);
      };
      TextureAssemblerNew.prototype.resetData = function(comp) {
        var points = comp.polygon;
        if (!points || points.length < 3) return;
        this.verticesCount = points.length;
        this.indicesCount = this.verticesCount + 2 * (this.verticesCount - 3);
        this._renderData.clear();
        this.initData();
      };
      TextureAssemblerNew.prototype.initQuadIndices = function(indices, arr) {
        for (var i = 0; i < arr.length; i++) indices[i] = arr[i];
      };
      TextureAssemblerNew.prototype.updateColor = function(comp, color) {
        var uintVerts = this._renderData.uintVDatas[0];
        if (!uintVerts) return;
        color = null != color ? color : comp.node.color["_val"];
        var floatsPerVert = this.floatsPerVert;
        var colorOffset = this.colorOffset;
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) uintVerts[colorOffset + i * floatsPerVert] = color;
      };
      TextureAssemblerNew.prototype.updateUVs = function(comp) {
        var uvOffset = this.uvOffset;
        var floatsPerVert = this.floatsPerVert;
        var verts = this._renderData.vDatas[0];
        var uvs = [];
        comp.texture && (uvs = CommonUtilsNew_1.CommonUtilsNew.computeUv(comp.polygon, comp.texture.width, comp.texture.height));
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) {
          var dstOffset = floatsPerVert * i + uvOffset;
          verts[dstOffset] = uvs[i].x;
          verts[dstOffset + 1] = uvs[i].y;
        }
      };
      TextureAssemblerNew.prototype.updateWorldVertsWebGL = function(comp) {
        var verts = this._renderData.vDatas[0];
        var matrix = comp.node["_worldMatrix"];
        var matrixm = matrix.m, a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5], tx = matrixm[12], ty = matrixm[13];
        var justTranslate = 1 === a && 0 === b && 0 === c && 1 === d;
        var floatsPerVert = this.floatsPerVert;
        if (justTranslate) {
          var polygon = comp.polygon;
          for (var i = 0; i < polygon.length; i++) {
            verts[i * floatsPerVert] = polygon[i].x + tx;
            verts[i * floatsPerVert + 1] = polygon[i].y + ty;
          }
        } else {
          var polygon = comp.polygon;
          for (var i = 0; i < polygon.length; i++) {
            verts[i * floatsPerVert] = a * polygon[i].x + c * polygon[i].y + tx;
            verts[i * floatsPerVert + 1] = b * polygon[i].x + d * polygon[i].y + ty;
          }
        }
      };
      TextureAssemblerNew.prototype.updateWorldVertsNative = function(comp) {
        var verts = this._renderData.vDatas[0];
        var floatsPerVert = this.floatsPerVert;
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) {
          verts[i * floatsPerVert] = polygon[i].x;
          verts[i * floatsPerVert + 1] = polygon[i].y;
        }
      };
      TextureAssemblerNew.prototype.updateWorldVerts = function(comp) {
        false;
        this.updateWorldVertsWebGL(comp);
      };
      TextureAssemblerNew.prototype.updateVerts = function(comp) {
        var indicesArr = CommonUtilsNew_1.CommonUtilsNew.splitPolygon(comp.polygon);
        this.initQuadIndices(this._renderData.iDatas[0], indicesArr);
        this.updateWorldVerts(comp);
      };
      TextureAssemblerNew.prototype.updateRenderData = function(comp) {
        if (comp._vertsDirty) {
          this.resetData(comp);
          this.updateUVs(comp);
          this.updateVerts(comp);
          this.updateColor(comp, null);
          comp._vertsDirty = false;
        }
      };
      TextureAssemblerNew.prototype.fillBuffers = function(comp, renderer) {
        renderer.worldMatDirty && this.updateWorldVerts(comp);
        var renderData = this._renderData;
        var vData = renderData.vDatas[0];
        var iData = renderData.iDatas[0];
        var buffer = this.getBuffer();
        var offsetInfo = buffer.request(this.verticesCount, this.indicesCount);
        var vertexOffset = offsetInfo.byteOffset >> 2, vbuf = buffer._vData;
        vData.length + vertexOffset > vbuf.length ? vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset) : vbuf.set(vData, vertexOffset);
        var ibuf = buffer._iData, indiceOffset = offsetInfo.indiceOffset, vertexId = offsetInfo.vertexOffset;
        for (var i = 0, l = iData.length; i < l; i++) ibuf[indiceOffset++] = vertexId + iData[i];
      };
      TextureAssemblerNew.prototype.packToDynamicAtlas = function(comp, frame) {
        false;
        if (!frame._original && cc.dynamicAtlasManager && frame._texture.packable) {
          var packedFrame = cc.dynamicAtlasManager.insertSpriteFrame(frame);
          packedFrame && frame._setDynamicAtlasFrame(packedFrame);
        }
        var material = comp._materials[0];
        if (!material) return;
        if (material.getProperty("texture") !== frame._texture) {
          comp._vertsDirty = true;
          comp._updateMaterial();
        }
      };
      return TextureAssemblerNew;
    }(cc.Assembler);
    exports.default = TextureAssemblerNew;
    cc._RF.pop();
  }, {
    "./CommonUtilsNew": "CommonUtilsNew"
  } ],
  TextureAssembler: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "88f72y+6ZpDTr4QuunZttb7", "TextureAssembler");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CommonUtils_1 = require("./CommonUtils");
    var gfx = cc["gfx"];
    var vfmtPosUvColor = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    } ]);
    var TextureAssembler = function(_super) {
      __extends(TextureAssembler, _super);
      function TextureAssembler() {
        var _this = _super.call(this) || this;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.floatsPerVert = 5;
        _this.uvOffset = 2;
        _this.colorOffset = 4;
        _this.indicesArr = [];
        _this._renderData = null;
        _this._renderData = new cc.RenderData();
        _this._renderData.init(_this);
        _this.initData();
        return _this;
      }
      Object.defineProperty(TextureAssembler.prototype, "verticesFloats", {
        get: function() {
          return this.verticesCount * this.floatsPerVert;
        },
        enumerable: false,
        configurable: true
      });
      TextureAssembler.prototype.getVfmt = function() {
        return vfmtPosUvColor;
      };
      TextureAssembler.prototype.getBuffer = function() {
        return cc.renderer["_handle"].getBuffer("mesh", this.getVfmt());
      };
      TextureAssembler.prototype.initData = function() {
        var data = this._renderData;
        data.createQuadData(0, this.verticesFloats, this.indicesCount);
      };
      TextureAssembler.prototype.resetData = function(comp) {
        var points = comp.polygon;
        if (!points || points.length < 3) return;
        this.verticesCount = points.length;
        this.indicesCount = this.verticesCount + 2 * (this.verticesCount - 3);
        this._renderData.clear();
        this.initData();
      };
      TextureAssembler.prototype.initQuadIndices = function(indices, arr) {
        for (var i = 0; i < arr.length; i++) indices[i] = arr[i];
      };
      TextureAssembler.prototype.updateColor = function(comp, color) {
        var uintVerts = this._renderData.uintVDatas[0];
        if (!uintVerts) return;
        color = null != color ? color : comp.node.color["_val"];
        var floatsPerVert = this.floatsPerVert;
        var colorOffset = this.colorOffset;
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) uintVerts[colorOffset + i * floatsPerVert] = color;
      };
      TextureAssembler.prototype.updateUVs = function(comp) {
        var uvOffset = this.uvOffset;
        var floatsPerVert = this.floatsPerVert;
        var verts = this._renderData.vDatas[0];
        var uvs = [];
        comp.texture && (uvs = CommonUtils_1.CommonUtils.computeUv(comp.polygon, comp.texture.width, comp.texture.height));
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) {
          var dstOffset = floatsPerVert * i + uvOffset;
          verts[dstOffset] = uvs[i].x;
          verts[dstOffset + 1] = uvs[i].y;
        }
      };
      TextureAssembler.prototype.updateWorldVertsWebGL = function(comp) {
        var verts = this._renderData.vDatas[0];
        var matrix = comp.node["_worldMatrix"];
        var matrixm = matrix.m, a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5], tx = matrixm[12], ty = matrixm[13];
        var justTranslate = 1 === a && 0 === b && 0 === c && 1 === d;
        var floatsPerVert = this.floatsPerVert;
        if (justTranslate) {
          var polygon = comp.polygon;
          for (var i = 0; i < polygon.length; i++) {
            verts[i * floatsPerVert] = polygon[i].x + tx;
            verts[i * floatsPerVert + 1] = polygon[i].y + ty;
          }
        } else {
          var polygon = comp.polygon;
          for (var i = 0; i < polygon.length; i++) {
            verts[i * floatsPerVert] = a * polygon[i].x + c * polygon[i].y + tx;
            verts[i * floatsPerVert + 1] = b * polygon[i].x + d * polygon[i].y + ty;
          }
        }
      };
      TextureAssembler.prototype.updateWorldVertsNative = function(comp) {
        var verts = this._renderData.vDatas[0];
        var floatsPerVert = this.floatsPerVert;
        var polygon = comp.polygon;
        for (var i = 0; i < polygon.length; i++) {
          verts[i * floatsPerVert] = polygon[i].x;
          verts[i * floatsPerVert + 1] = polygon[i].y;
        }
      };
      TextureAssembler.prototype.updateWorldVerts = function(comp) {
        false;
        this.updateWorldVertsWebGL(comp);
      };
      TextureAssembler.prototype.updateVerts = function(comp) {
        var indicesArr = CommonUtils_1.CommonUtils.splitPolygon(comp.polygon);
        this.initQuadIndices(this._renderData.iDatas[0], indicesArr);
        this.updateWorldVerts(comp);
      };
      TextureAssembler.prototype.updateRenderData = function(comp) {
        if (comp._vertsDirty) {
          this.resetData(comp);
          this.updateUVs(comp);
          this.updateVerts(comp);
          this.updateColor(comp, null);
          comp._vertsDirty = false;
        }
      };
      TextureAssembler.prototype.fillBuffers = function(comp, renderer) {
        renderer.worldMatDirty && this.updateWorldVerts(comp);
        var renderData = this._renderData;
        var vData = renderData.vDatas[0];
        var iData = renderData.iDatas[0];
        var buffer = this.getBuffer();
        var offsetInfo = buffer.request(this.verticesCount, this.indicesCount);
        var vertexOffset = offsetInfo.byteOffset >> 2, vbuf = buffer._vData;
        vData.length + vertexOffset > vbuf.length ? vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset) : vbuf.set(vData, vertexOffset);
        var ibuf = buffer._iData, indiceOffset = offsetInfo.indiceOffset, vertexId = offsetInfo.vertexOffset;
        for (var i = 0, l = iData.length; i < l; i++) ibuf[indiceOffset++] = vertexId + iData[i];
      };
      TextureAssembler.prototype.packToDynamicAtlas = function(comp, frame) {
        false;
        if (!frame._original && cc.dynamicAtlasManager && frame._texture.packable) {
          var packedFrame = cc.dynamicAtlasManager.insertSpriteFrame(frame);
          packedFrame && frame._setDynamicAtlasFrame(packedFrame);
        }
        var material = comp._materials[0];
        if (!material) return;
        if (material.getProperty("texture") !== frame._texture) {
          comp._vertsDirty = true;
          comp._updateMaterial();
        }
      };
      return TextureAssembler;
    }(cc.Assembler);
    exports.default = TextureAssembler;
    cc._RF.pop();
  }, {
    "./CommonUtils": "CommonUtils"
  } ],
  TexturePlusNew: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "649b1TiQOZHlYgvQlSE4Cum", "TexturePlusNew");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CommonUtilsNew_1 = require("./CommonUtilsNew");
    var TextureAssemblerNew_1 = require("./TextureAssemblerNew");
    var renderEngine = cc.renderer.renderEngine;
    var TextureType;
    (function(TextureType) {
      TextureType[TextureType["Cut"] = 0] = "Cut";
      TextureType[TextureType["Stretch"] = 1] = "Stretch";
    })(TextureType || (TextureType = {}));
    var _vec2_temp = new cc.Vec2();
    var _mat4_temp = new cc.Mat4();
    var _a = cc._decorator, ccclass = _a.ccclass, inspector = _a.inspector, executeInEditMode = _a.executeInEditMode, mixins = _a.mixins, property = _a.property;
    var TexturePlusNew = function(_super) {
      __extends(TexturePlusNew, _super);
      function TexturePlusNew() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._texture = null;
        _this._type = 0;
        _this.editing = false;
        _this._polygon = [];
        _this.flyFlag = false;
        _this._assembler = null;
        return _this;
      }
      Object.defineProperty(TexturePlusNew.prototype, "texture", {
        get: function() {
          return this._texture;
        },
        set: function(val) {
          this._texture = val;
          var l = -val.width / 2, b = -val.height / 2, t = val.height / 2, r = val.width / 2;
          this.polygon = [ cc.v2(l, b), cc.v2(r, b), cc.v2(r, t), cc.v2(l, t) ];
          this._updateMaterial();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TexturePlusNew.prototype, "type", {
        get: function() {
          return this._type;
        },
        set: function(val) {
          this._type = val;
          this.setVertsDirty();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TexturePlusNew.prototype, "polygon", {
        get: function() {
          return this._polygon;
        },
        set: function(points) {
          this._polygon = points;
          this._updateVerts();
        },
        enumerable: false,
        configurable: true
      });
      TexturePlusNew.prototype.onLoad = function() {
        this.node["_hitTest"] = this._hitTest.bind(this);
      };
      TexturePlusNew.prototype.start = function() {
        var _this = this;
        this.node.on(cc.Node.EventType.TOUCH_START, function() {
          console.log("click texture plus");
        }, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, function(e) {
          _this.node.x += e.getDeltaX();
          _this.node.y += e.getDeltaY();
        }, this);
      };
      TexturePlusNew.prototype._updateVerts = function() {
        this.setVertsDirty();
      };
      TexturePlusNew.prototype._updateMaterial = function() {
        var texture = this._texture;
        var material = this.getMaterial(0);
        if (material) {
          void 0 !== material.getDefine("USE_TEXTURE") && material.define("USE_TEXTURE", true);
          material.setProperty("texture", texture);
        }
        this.setVertsDirty();
      };
      TexturePlusNew.prototype._validateRender = function() {};
      TexturePlusNew.prototype._resetAssembler = function() {
        var assembler = this._assembler = new TextureAssemblerNew_1.default();
        assembler.init(this);
        this._updateColor();
        this.setVertsDirty();
      };
      TexturePlusNew.prototype._hitTest = function(cameraPt) {
        var node = this.node;
        var testPt = _vec2_temp;
        node["_updateWorldMatrix"]();
        if (!cc.Mat4.invert(_mat4_temp, node["_worldMatrix"])) return false;
        cc.Vec2.transformMat4(testPt, cameraPt, _mat4_temp);
        return CommonUtilsNew_1.CommonUtilsNew.isInPolygon(testPt, this.polygon);
      };
      TexturePlusNew.Type = TextureType;
      __decorate([ property(cc.Texture2D) ], TexturePlusNew.prototype, "_texture", void 0);
      __decorate([ property(cc.Texture2D) ], TexturePlusNew.prototype, "texture", null);
      __decorate([ property({
        type: cc.Enum(TextureType),
        serializable: true
      }) ], TexturePlusNew.prototype, "type", null);
      __decorate([ property(cc.Boolean) ], TexturePlusNew.prototype, "editing", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        serializable: true
      }) ], TexturePlusNew.prototype, "_polygon", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        serializable: true
      }) ], TexturePlusNew.prototype, "polygon", null);
      TexturePlusNew = __decorate([ ccclass, executeInEditMode ], TexturePlusNew);
      return TexturePlusNew;
    }(cc.RenderComponent);
    exports.default = TexturePlusNew;
    cc._RF.pop();
  }, {
    "./CommonUtilsNew": "CommonUtilsNew",
    "./TextureAssemblerNew": "TextureAssemblerNew"
  } ],
  TexturePlus: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "486b64lwQRMvYqMZ8IvjsBM", "TexturePlus");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var CommonUtils_1 = require("./CommonUtils");
    var TextureAssembler_1 = require("./TextureAssembler");
    var renderEngine = cc.renderer.renderEngine;
    var TextureType;
    (function(TextureType) {
      TextureType[TextureType["Cut"] = 0] = "Cut";
      TextureType[TextureType["Stretch"] = 1] = "Stretch";
    })(TextureType || (TextureType = {}));
    var _vec2_temp = new cc.Vec2();
    var _mat4_temp = new cc.Mat4();
    var _a = cc._decorator, ccclass = _a.ccclass, inspector = _a.inspector, executeInEditMode = _a.executeInEditMode, mixins = _a.mixins, property = _a.property;
    var TexturePlus = function(_super) {
      __extends(TexturePlus, _super);
      function TexturePlus() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this._texture = null;
        _this._type = 0;
        _this.editing = false;
        _this._polygon = [];
        _this._assembler = null;
        return _this;
      }
      Object.defineProperty(TexturePlus.prototype, "texture", {
        get: function() {
          return this._texture;
        },
        set: function(val) {
          this._texture = val;
          var l = -val.width / 2, b = -val.height / 2, t = val.height / 2, r = val.width / 2;
          this.polygon = [ cc.v2(l, b), cc.v2(r, b), cc.v2(r, t), cc.v2(l, t) ];
          this._updateMaterial();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TexturePlus.prototype, "type", {
        get: function() {
          return this._type;
        },
        set: function(val) {
          this._type = val;
          this.setVertsDirty();
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(TexturePlus.prototype, "polygon", {
        get: function() {
          return this._polygon;
        },
        set: function(points) {
          this._polygon = points;
          this._updateVerts();
        },
        enumerable: false,
        configurable: true
      });
      TexturePlus.prototype.onLoad = function() {
        this.node["_hitTest"] = this._hitTest.bind(this);
      };
      TexturePlus.prototype.start = function() {};
      TexturePlus.prototype._updateVerts = function() {
        this.setVertsDirty();
      };
      TexturePlus.prototype._updateMaterial = function() {
        var texture = this._texture;
        var material = this.getMaterial(0);
        if (material) {
          void 0 !== material.getDefine("USE_TEXTURE") && material.define("USE_TEXTURE", true);
          material.setProperty("texture", texture);
        }
        this.setVertsDirty();
      };
      TexturePlus.prototype._validateRender = function() {};
      TexturePlus.prototype._resetAssembler = function() {
        var assembler = this._assembler = new TextureAssembler_1.default();
        assembler.init(this);
        this._updateColor();
        this.setVertsDirty();
      };
      TexturePlus.prototype._hitTest = function(cameraPt) {
        var node = this.node;
        var testPt = _vec2_temp;
        node["_updateWorldMatrix"]();
        if (!cc.Mat4.invert(_mat4_temp, node["_worldMatrix"])) return false;
        cc.Vec2.transformMat4(testPt, cameraPt, _mat4_temp);
        return CommonUtils_1.CommonUtils.isInPolygon(testPt, this.polygon);
      };
      TexturePlus.Type = TextureType;
      __decorate([ property(cc.Texture2D) ], TexturePlus.prototype, "_texture", void 0);
      __decorate([ property(cc.Texture2D) ], TexturePlus.prototype, "texture", null);
      __decorate([ property({
        type: cc.Enum(TextureType),
        serializable: true
      }) ], TexturePlus.prototype, "type", null);
      __decorate([ property(cc.Boolean) ], TexturePlus.prototype, "editing", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        serializable: true
      }) ], TexturePlus.prototype, "_polygon", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        serializable: true
      }) ], TexturePlus.prototype, "polygon", null);
      TexturePlus = __decorate([ ccclass, executeInEditMode ], TexturePlus);
      return TexturePlus;
    }(cc.RenderComponent);
    exports.default = TexturePlus;
    cc._RF.pop();
  }, {
    "./CommonUtils": "CommonUtils",
    "./TextureAssembler": "TextureAssembler"
  } ],
  TikTokPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9bb5bZzrpBI9YjRRHcB0aGz", "TikTokPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.TikTokPlatform = void 0;
    var ResLoader_1 = require("../common/loader/ResLoader");
    var Logger_1 = require("../common/log/Logger");
    var Engine_1 = require("../Engine");
    var PlatformManager_1 = require("./PlatformManager");
    var TikTokPlatform = function() {
      function TikTokPlatform() {
        var _this = this;
        this._isRecording = false;
        this._clipIndexList = null;
        this._recorder = null;
        this._isRecordFinished = false;
        this._startTime = 0;
        this._MinRecordTime = 5e3;
        this._MaxRecordTime = 3e5;
        this._TouchBol = false;
        this._FirstBol = false;
        ResLoader_1.resLoader.loadDir("config", function() {
          var config = ResLoader_1.resLoader.get("config/config").json;
          _this._rewardedADId = config.AdvertisingID.rewardedVideoADIdForTT;
          _this._bannerADId = config.AdvertisingID.bannerVideoADIdForTT;
          _this._interstitialADId = config.AdvertisingID.interstitialVideoADIdForTT;
          _this._interstitialAdChances = config.InterstitialAdChances.value;
          _this._title = config.Share.Title;
          _this._desc = config.Share.Desc;
          _this._imageUrl = config.Share.ImageUrl;
          _this._shareTemplateId = config.Share.TemplateId;
          _this._TouchBol = false;
          _this._FirstBol = false;
        });
      }
      TikTokPlatform.prototype.init = function() {
        var _this = this;
        var self = this;
        tt.getSystemInfo({
          success: function(res) {
            self._systemInfo = res;
          },
          fail: function(res) {}
        });
        tt.showShareMenu({
          menus: [ "share", "record" ],
          success: function(res) {},
          fail: function(err) {}
        });
        tt.onShareAppMessage(function() {
          return {
            title: _this._title,
            imageUrl: _this._imageUrl,
            success: function() {},
            fail: function(err) {}
          };
        });
        tt.onError(function(err) {});
        tt.onShow(function() {});
        tt.onTouchEnd(function() {
          if (true == self._TouchBol) {
            tt.addShortcut({
              success: function() {
                Logger_1.Logger.logInterface("\u6dfb\u52a0\u5feb\u6377\u56fe\u6807\u6210\u529f");
                Engine_1.engine.gui.toast("\u6dfb\u52a0\u6210\u529f");
              },
              fail: function(err) {
                Logger_1.Logger.logInterface("\u6dfb\u52a0\u5feb\u6377\u56fe\u6807\u5931\u8d25 : " + JSON.stringify(err));
                Engine_1.engine.gui.toast("\u6dfb\u52a0\u5931\u8d25");
              }
            });
            self._TouchBol = false;
          }
        });
        this.createRewardedAd();
        this.createInterstitialAd();
      };
      TikTokPlatform.prototype.login = function(callback) {
        var _lauchInfo = tt.getLaunchOptionsSync();
        var shareId = 0;
        var self = this;
        tt.login({
          force: true,
          success: function(res) {
            callback && callback(true, null);
            console.log("\u767b\u5f55\u6210\u529f");
            if (res.code || res.anonymousCode) var data = {
              code: res.code,
              nameIt: true,
              anonymousCode: res.anonymousCode,
              referenceId: shareId,
              referenceType: 0,
              gameId: Engine_1.engine.gameId
            }; else if (callback) {
              callback(false, res.errMsg);
              console.log(res.errMsg);
            }
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        });
      };
      TikTokPlatform.prototype.request = function(url, data, method, callback) {
        var requestCall = tt.request;
        requestCall ? requestCall({
          url: url,
          method: method,
          data: data,
          success: function(res) {
            200 == res.statusCode ? 0 == res.data.code ? callback && callback(true, res.data) : callback && callback(false, res.data.code) : callback && callback(false, res.statusCode);
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        }) : callback && callback(false, "requestCall\u4e3a\u7a7a");
      };
      TikTokPlatform.prototype.getUserInfo = function(callback) {
        tt.getSetting({
          success: function(res) {
            res.authSetting["scope.userInfo"] ? tt.getUserInfo({
              success: function(res) {
                callback && callback(true, res);
              },
              fail: function(res) {
                callback && callback(false, res.errMsg);
              }
            }) : tt.authorize({
              scope: "scope.userInfo",
              success: function(res) {
                "authorize:ok" === res.errMsg ? tt.getUserInfo({
                  success: function(res) {
                    callback && callback(true, res);
                  },
                  fail: function(res) {
                    callback && callback(false, res.errMsg);
                  }
                }) : callback && callback(false, res.errMsg);
              },
              fail: function(res) {
                callback && callback(false, res);
              }
            });
          },
          fail: function(res) {
            callback && callback(false, res);
          }
        });
      };
      TikTokPlatform.prototype.saveUserInfo = function(userName, url, callback) {
        var data = {
          data: {
            nickname: userName,
            headUrl: url
          }
        };
        var self = this;
      };
      TikTokPlatform.prototype.setClipboardData = function(sourcedata) {
        tt.setClipboardData({
          data: sourcedata,
          success: function(res) {}
        });
      };
      TikTokPlatform.prototype.getSystemInfo = function() {
        return this._systemInfo;
      };
      TikTokPlatform.prototype.restartGame = function() {
        tt.restartMiniProgramSync();
      };
      TikTokPlatform.prototype.isRecordingTooShort = function() {
        return !!(this._isRecording && Date.now() - this._startTime < this._MinRecordTime);
      };
      TikTokPlatform.prototype.getRecordStatu = function() {
        return this._isRecordFinished ? PlatformManager_1.RecordStatu.Finished : this._isRecording ? PlatformManager_1.RecordStatu.Recording : PlatformManager_1.RecordStatu.Inactive;
      };
      TikTokPlatform.prototype.startGameRecord = function() {
        var _this = this;
        this._recorder = tt.getGameRecorderManager();
        this._recorder.onStart(function(res) {
          Logger_1.Logger.logInterface("start GameRecord \uff1a " + res);
          _this._startTime = new Date().getTime();
          _this._isRecording = true;
        });
        this._recorder.onStop(function(res) {
          Logger_1.Logger.logInterface("stop GameRecord \uff1a " + res.videoPath);
          _this._videoPath = res.videoPath;
          _this._isRecording = false;
          _this._isRecordFinished = true;
        });
        this._recorder.start({
          duration: this._MaxRecordTime
        });
      };
      TikTokPlatform.prototype.stopGameRecord = function() {
        this._recorder.stop();
      };
      TikTokPlatform.prototype.shareGameRecord = function(callback) {
        this.getRecordStatu() == PlatformManager_1.RecordStatu.Recording && this.stopGameRecord();
        var self = this;
        tt.shareAppMessage({
          channel: "video",
          title: this._title,
          imageUrl: this._imageUrl,
          templateId: this._shareTemplateId,
          extra: {
            videoPath: this._videoPath,
            videoTopics: [ this._title ],
            createChallenge: true,
            hashtag_list: [ this._title ]
          },
          success: function() {
            Logger_1.Logger.logInterface("\u5206\u4eab\u89c6\u9891\u6210\u529f");
            self._isRecordFinished = false;
            callback(true);
          },
          fail: function(err) {
            Logger_1.Logger.logInterface("\u5206\u4eab\u89c6\u9891\u5931\u8d25 : " + JSON.stringify(err));
            self._isRecordFinished = false;
            callback(false);
          }
        });
      };
      TikTokPlatform.prototype.createRewardedAd = function() {
        var _this = this;
        this._rewardedAd = tt.createRewardedVideoAd({
          adUnitId: this._rewardedADId
        });
        try {
          cb && this._rewardedAd.offClose(cb);
        } catch (err) {}
        var cb = function(res) {
          res && res.isEnded ? _this._rewardedCallBack(true) : _this._rewardedCallBack(false);
        };
        this._rewardedAd.onClose(cb);
        this._rewardedAd.onError(function(err) {
          _this._rewardedCallBack(false);
        });
      };
      TikTokPlatform.prototype.createInterstitialAd = function() {
        this._interstitialAd = tt.createInterstitialAd({
          adUnitId: this._interstitialADId
        });
        try {
          cb && this._interstitialAd.offClose(cb);
        } catch (err) {}
        var cb = function(res) {};
        this._interstitialAd.onClose(cb);
      };
      TikTokPlatform.prototype.showRewardedAd = function(callback) {
        var _this = this;
        if (null != this._rewardedAd) {
          this._rewardedCallBack = callback;
          this._rewardedAd.load().then(function() {
            Logger_1.Logger.logInterface("\u6fc0\u52b1\u5e7f\u544a\u52a0\u8f7d\u6210\u529f");
            _this._rewardedAd.show().then(function() {}).catch(function(err) {
              Logger_1.Logger.logInterface("\u6fc0\u52b1\u5e7f\u544a\u64ad\u653e\u5931\u8d25 \uff1a " + JSON.stringify(err));
              _this.onShare(_this._rewardedCallBack);
            });
          }).catch(function(err) {
            Logger_1.Logger.logInterface("\u6fc0\u52b1\u5e7f\u544a\u52a0\u8f7d\u5931\u8d25 : " + JSON.stringify(err));
            _this.onShare(_this._rewardedCallBack);
          });
        } else {
          Logger_1.Logger.logInterface("\u6fc0\u52b1\u5e7f\u544a\u521d\u59cb\u5316\u5931\u8d25\u4e86");
          this.onShare(this._rewardedCallBack);
        }
      };
      TikTokPlatform.prototype.showInterstitialAd = function() {
        var _this = this;
        null != this._interstitialAd && this._interstitialAd.load().then(function() {
          Logger_1.Logger.logInterface("\u63d2\u5c4f\u5e7f\u544a\u52a0\u8f7d\u5b8c\u6210");
          _this._interstitialAd.show().then(function() {
            Logger_1.Logger.logInterface("\u63d2\u5c4f\u6210\u529f\u64ad\u653e");
          }).catch(function(err) {
            Logger_1.Logger.logInterface("\u63d2\u5c4f\u5e7f\u544a\u64ad\u653e\u5931\u8d25 \uff1a " + JSON.stringify(err));
          });
        });
      };
      TikTokPlatform.prototype.showBannerAd = function(bannerType, top, left, width) {
        var _this = this;
        switch (bannerType) {
         case PlatformManager_1.BannerType.None:
          this._bannerWidth = width;
          break;

         default:
          this._bannerWidth = this._systemInfo.windowWidth;
        }
        null != this._bannerAD && this._bannerAd.destroy();
        this._bannerAd = tt.createBannerAd({
          adUnitId: this._bannerADId,
          adIntervals: 30,
          style: {
            left: 0,
            top: 0,
            width: Math.floor(this._bannerWidth)
          }
        });
        this._bannerAd.onError(function(err) {
          Logger_1.Logger.logInterface("banner \u5e7f\u544a\u52a0\u8f7d\u9519\u8bef", err);
        });
        null != this._bannerAd && this._bannerAd.onLoad(function() {
          _this._bannerAd.show().then(function() {
            Logger_1.Logger.logInterface("Banner\u5e7f\u544a\u663e\u793a\u6210\u529f");
          });
        });
      };
      TikTokPlatform.prototype.hideBannerAd = function() {
        if (null != this._bannerAd) {
          this._bannerAd.hide();
          this._bannerAd.destroy();
        }
      };
      TikTokPlatform.prototype.onShare = function(callback) {
        tt.shareAppMessage({
          templateId: this._shareTemplateId,
          success: function() {
            callback(true);
          },
          fail: function(e) {
            callback(false);
          }
        });
      };
      TikTokPlatform.prototype.addShortcut = function(callback) {};
      TikTokPlatform.prototype.checkShortcut = function(callback) {
        var self = this;
        if (false == self._FirstBol) {
          Engine_1.engine.gui.toast("\u6dfb\u52a0\u6210\u529f");
          self._FirstBol = true;
        }
        tt.checkShortcut({
          success: function(res) {
            Logger_1.Logger.logInterface("checkShortcut\u6210\u529f \uff1a " + JSON.stringify(res));
            console.log("\u6253\u5370!res.status.exist " + !res.status.exist);
            console.log("\u6253\u5370res.status.needUpdate " + res.status.needUpdate);
            if (!res.status.exist || res.status.needUpdate) {
              callback(false);
              self._TouchBol = true;
            } else {
              callback(true);
              self._TouchBol = false;
            }
          },
          fail: function(err) {
            Logger_1.Logger.logInterface("checkShortcut\u5931\u8d25 \uff1a " + JSON.stringify(err));
            callback(false);
            self._TouchBol = true;
          }
        });
      };
      TikTokPlatform.prototype.checkFollowState = function(callback) {
        tt.checkFollowState({
          success: function(res) {
            callback && callback(true);
          },
          fail: function(err) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.followOfficialAccount = function(callback) {
        tt.followOfficialAccount({
          success: function(res) {
            0 === res.errCode ? callback && callback(true) : callback && callback(false);
          },
          fail: function(err) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.openAwemeUserProfile = function(callback) {
        tt.openAwemeUserProfile({
          success: function(res) {
            callback && callback(true);
          },
          fail: function(err) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.checkFollowAwemeState = function(callback) {
        tt.checkFollowAwemeState({
          success: function(res) {
            callback && callback(true);
          },
          fail: function(err) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.showFavoriteGuide = function(callback) {
        callback ? tt.showFavoriteGuide({
          type: "customize",
          success: function(res) {
            callback(res.isFavorited);
          },
          fail: function(res) {
            callback(false);
          }
        }) : tt.showFavoriteGuide({
          type: "bar",
          content: "\u4e00\u952e\u6dfb\u52a0\u5230\u6211\u7684\u5c0f\u7a0b\u5e8f",
          position: "bottom",
          success: function(res) {
            callback(res.isFavorited);
          },
          fail: function(res) {
            tt.showFavoriteGuide({
              type: "tip",
              content: "\u559c\u6b22\u5c31\u6536\u85cf/\u6dfb\u52a0\u5230\u684c\u9762\u5427",
              position: "bottom",
              success: function(res) {
                callback(res.isFavorited);
              },
              fail: function(res) {
                callback(false);
              }
            });
          }
        });
      };
      TikTokPlatform.prototype.followAwemeUser = function(callback) {
        tt.followAwemeUser({
          success: function(res) {
            callback && callback(true);
          },
          fail: function(err) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.vibrateShort = function(vibrateType) {
        tt.vibrateShort({
          success: function(res) {},
          fail: function(res) {}
        });
      };
      TikTokPlatform.prototype.vibrateLong = function() {
        tt.vibrateLong({
          success: function(res) {},
          fail: function(res) {}
        });
      };
      TikTokPlatform.prototype.setImRankData = function(options, callback) {
        tt.setImRankData({
          dataType: options.dataType,
          value: options.value,
          priority: options.priority,
          extra: options.extra,
          success: function(res) {
            console.log("setImRankData success res: " + res);
            callback && callback(true);
          },
          fail: function(res) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.getImRankList = function(options, callback) {
        tt.getImRankList({
          relationType: options.relationType,
          dataType: options.dataType,
          rankType: options.rankType,
          suffix: options.suffix,
          rankTitle: options.rankTitle,
          success: function(res) {
            console.log("getImRankData success res: " + res);
            callback && callback(true);
          },
          fail: function(res) {
            callback && callback(false);
          }
        });
      };
      TikTokPlatform.prototype.getImRankData = function(options) {
        tt.getImRankData({
          relationType: options.relationType,
          dataType: options.dataType,
          rankType: options.rankType,
          pageNum: options.pageNum,
          pageSize: options.pageSize,
          success: function(res) {
            console.log("getImRankData success res: " + res);
          },
          fail: function(res) {}
        });
      };
      TikTokPlatform.prototype.exitGame = function() {};
      return TikTokPlatform;
    }();
    exports.TikTokPlatform = TikTokPlatform;
    cc._RF.pop();
  }, {
    "../Engine": "Engine",
    "../common/loader/ResLoader": "ResLoader",
    "../common/log/Logger": "Logger",
    "./PlatformManager": "PlatformManager"
  } ],
  TimerManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ddd02QrLjFBx7EBwsnZHc+d", "TimerManager");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Timer = exports.TimerManager = void 0;
    var EventDispatcher_1 = require("../event/EventDispatcher");
    var guid = function() {
      var guid = "";
      for (var i = 1; i <= 32; i++) {
        var n = Math.floor(16 * Math.random()).toString(16);
        guid += n;
        8 != i && 12 != i && 16 != i && 20 != i || (guid += "-");
      }
      return guid;
    };
    var TimerManager = function(_super) {
      __extends(TimerManager, _super);
      function TimerManager(component) {
        var _this = _super.call(this) || this;
        _this.schedules = {};
        _this._scheduleCount = 1;
        _this.initTime = new Date().getTime();
        _this._$serverTimeElasped = 0;
        _this.component = component;
        _this.schedule(_this.onUpdate, 1);
        return _this;
      }
      TimerManager.prototype.serverTimeElasped = function(val) {
        val && (this._$serverTimeElasped = val);
        return this._$serverTimeElasped;
      };
      TimerManager.prototype.format = function(format, date) {
        var o = {
          "M+": date.getMonth() + 1,
          "d+": date.getDate(),
          "h+": date.getHours(),
          "m+": date.getMinutes(),
          "s+": date.getSeconds(),
          "q+": Math.floor((date.getMonth() + 3) / 3),
          S: date.getMilliseconds()
        };
        /(y+)/.test(format) && (format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var k in o) new RegExp("(" + k + ")").test(format) && (format = format.replace(RegExp.$1, 1 == RegExp.$1.length ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)));
        return format;
      };
      TimerManager.prototype.getCostTimeString = function(format, timeCost) {
        var days = Math.floor(timeCost / 864e5);
        var leave1 = timeCost % 864e5;
        var hours = Math.floor(leave1 / 36e5);
        var leave2 = leave1 % 36e5;
        var minutes = Math.floor(leave2 / 6e4);
        var leave3 = leave2 % 6e4;
        var seconds = Math.round(leave3 / 1e3);
        var o = {
          "d+": days,
          "h+": hours,
          "m+": minutes,
          "s+": seconds
        };
        for (var k in o) new RegExp("(" + k + ")").test(format) && (format = format.replace(RegExp.$1, 1 == RegExp.$1.length ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)));
        return format;
      };
      TimerManager.prototype.getTime = function() {
        return this.getLocalTime() - this.initTime;
      };
      TimerManager.prototype.getLocalTime = function() {
        return Date.now();
      };
      TimerManager.prototype.schedule = function(callback, interval) {
        var UUID = "schedule_" + this._scheduleCount++;
        this.schedules[UUID] = callback;
        this.component.schedule(callback, interval);
        return UUID;
      };
      TimerManager.prototype.scheduleOnce = function(callback, delay) {
        var _this = this;
        void 0 === delay && (delay = 0);
        var UUID = "scheduleOnce_" + this._scheduleCount++;
        this.schedules[UUID] = callback;
        this.component.scheduleOnce(function() {
          var cb = _this.schedules[UUID];
          cb && cb();
          _this.unschedule(UUID);
        }, Math.max(delay, 0));
        return UUID;
      };
      TimerManager.prototype.unschedule = function(uuid) {
        var cb = this.schedules[uuid];
        if (cb) {
          this.component.unschedule(cb);
          delete this.schedules[uuid];
        }
      };
      TimerManager.prototype.unscheduleAllCallbacks = function() {
        for (var k in this.schedules) this.component.unschedule(this.schedules[k]);
        this.schedules = {};
      };
      TimerManager.prototype.onUpdate = function(dt) {
        for (var key in TimerManager.times) {
          var data = TimerManager.times[key];
          if (data.special) {
            if ("GameTime" == data.field) {
              var nowTime = new Date().getTime() - data.Object["userRegisterDate"];
              data.Object[data.field] = nowTime;
            } else if ("incubateTime" == data.field) {
              var nowTime = data.Object["templateTime"] - new Date().getTime();
              nowTime <= 0 && (nowTime = 0);
              data.Object[data.field] = nowTime;
            }
            continue;
          }
          var elapsedTime = 0;
          data.object[data.field + "Time"] && (elapsedTime = (data.object[data.field + "Time"] - new Date().getTime()) / 1e3);
          if (data.object[data.field] > 0) {
            data.object[data.field]--;
            elapsedTime != data.object[data.field] && (data.object[data.field] = elapsedTime.toFixed(0));
            if (data.object[data.field] <= 0) {
              data.onComplete && data.onComplete.call(data.object);
              data.event && this.dispatchEvent(data.event);
            } else data.onSecond && data.onSecond.call(data.object);
          }
        }
      };
      TimerManager.prototype.save = function() {
        for (var key in TimerManager.times) TimerManager.times[key].startTime = this.getTime();
      };
      TimerManager.prototype.load = function() {
        for (var key in TimerManager.times) {
          var interval = Math.floor((this.getTime() - (TimerManager.times[key].startTime || this.getTime())) / 1e3);
          var data = TimerManager.times[key];
          if (data.special) continue;
          data.object[data.field] = data.object[data.field] - interval;
          data.object[data.field] < 0 && (data.object[data.field] = 0);
          TimerManager.times[key].startTime = null;
        }
      };
      TimerManager.prototype.registerObject = function(object, field, onSecond, onComplete) {
        var data = {};
        data.id = guid();
        data.object = object;
        data.field = field;
        data.onSecond = onSecond;
        data.onComplete = onComplete;
        TimerManager.times[data.id] = data;
        return data.id;
      };
      TimerManager.prototype.unRegisterObject = function(id) {
        TimerManager.times[id] && delete TimerManager.times[id];
      };
      TimerManager.prototype.register = function(event, object, field) {
        var data = {};
        data.id = event;
        data.event = event;
        data.object = object;
        data.field = field;
        TimerManager.times[data.id] = data;
      };
      TimerManager.prototype.unRegister = function(event) {
        TimerManager.times[event] && delete TimerManager.times[event];
      };
      TimerManager.prototype.registerConversionTimes = function(Object, field) {
        var data = {};
        data.id = guid();
        data.Object = Object;
        data.field = field;
        data.special = true;
        TimerManager.times[data.id] = data;
        return data.id;
      };
      TimerManager.prototype.unRegisterConversionTimes = function(id) {
        TimerManager.times[id] && delete TimerManager.times[id];
      };
      TimerManager.times = {};
      return TimerManager;
    }(EventDispatcher_1.EventDispatcher);
    exports.TimerManager = TimerManager;
    var Timer = function() {
      function Timer(step) {
        void 0 === step && (step = 0);
        this.callback = null;
        this._elapsedTime = 0;
        this._step = 0;
        this.step = step;
      }
      Object.defineProperty(Timer.prototype, "elapsedTime", {
        get: function() {
          return this._elapsedTime;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Timer.prototype, "step", {
        get: function() {
          return this._step;
        },
        set: function(step) {
          this._step = step;
          this._elapsedTime = 0;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Timer.prototype, "progress", {
        get: function() {
          return this._elapsedTime / this._step;
        },
        enumerable: false,
        configurable: true
      });
      Timer.prototype.update = function(dt) {
        var _a;
        this._elapsedTime += dt;
        if (this._elapsedTime >= this._step) {
          this._elapsedTime -= this._step;
          null === (_a = this.callback) || void 0 === _a ? void 0 : _a.call(this);
          return true;
        }
        return false;
      };
      Timer.prototype.reset = function() {
        this._elapsedTime = 0;
      };
      return Timer;
    }();
    exports.Timer = Timer;
    cc._RF.pop();
  }, {
    "../event/EventDispatcher": "EventDispatcher"
  } ],
  TipsManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "527d8GoSelIy4npnT8Dfnzc", "TipsManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.tips = void 0;
    var GameUIConfig_1 = require("../../../game/common/config/GameUIConfig");
    var Engine_1 = require("../../Engine");
    var ViewUtil_1 = require("../../utils/ViewUtil");
    var TipsManager = function() {
      function TipsManager() {
        this._timeId = "";
      }
      TipsManager.prototype.networkRecovery = function() {
        if (this._timeId) {
          Engine_1.engine.timer.unschedule(this._timeId);
          this._timeId = "";
        }
      };
      TipsManager.prototype.netInstableOpen = function() {};
      TipsManager.prototype.netInstableClose = function() {};
      TipsManager.prototype.networkLatency = function(time) {
        this._timeId && Engine_1.engine.timer.unschedule(this._timeId);
        this._timeId = Engine_1.engine.timer.scheduleOnce(this.netInstableOpen, time);
      };
      TipsManager.prototype.test = function(data, callback) {
        Engine_1.engine.gui.open(GameUIConfig_1.UIID.Window, data, exports.tips.zoomAnimation());
      };
      TipsManager.prototype.alert = function(content, cb, title, okWord) {
        var operate = {
          title: title || "common_prompt_title_sys",
          content: content,
          okWord: okWord || "common_prompt_ok",
          okFunc: function() {
            cb && cb();
          },
          needCancel: false
        };
        Engine_1.engine.gui.open(GameUIConfig_1.UIID.Window, operate, exports.tips.getPopCommonEffect());
      };
      TipsManager.prototype.confirm = function(content, cb, okWord) {
        void 0 === okWord && (okWord = "common_prompt_ok");
        var operate = {
          title: "common_prompt_title_sys",
          content: content,
          okWord: okWord,
          cancelWord: "common_prompt_cancal",
          okFunc: function() {
            cb && cb();
          },
          cancelFunc: function() {},
          needCancel: true
        };
        Engine_1.engine.gui.open(GameUIConfig_1.UIID.Window, operate, exports.tips.getPopCommonEffect());
      };
      TipsManager.prototype.getPopCommonEffect = function(callbacks) {
        var newCallbacks = {
          onAdded: function(node, params) {
            node.setScale(.1, .1, .1);
            cc.tween(node).to(.2, {
              scale: new cc.Vec3(1, 1, 1)
            }).start();
          },
          onBeforeRemove: function(node, next) {
            cc.tween(node).to(.2, {
              scale: new cc.Vec3(.1, .1, .1)
            }).call(next).start();
          }
        };
        if (callbacks) {
          if (callbacks && callbacks.onAdded) {
            var onAdded_1 = callbacks.onAdded;
            callbacks.onAdded = function(node, params) {
              onAdded_1(node, params);
              newCallbacks.onAdded(node, params);
            };
          }
          if (callbacks && callbacks.onBeforeRemove) {
            var onBeforeRemove_1 = callbacks.onBeforeRemove;
            callbacks.onBeforeRemove = function(node, params) {
              onBeforeRemove_1(node, params);
              newCallbacks.onBeforeRemove(node, params);
            };
          }
          return callbacks;
        }
        return newCallbacks;
      };
      TipsManager.prototype.zoomAnimation = function(callbacks) {
        var newCallbacks = {
          onAdded: function(node, params) {
            var a = ViewUtil_1.ViewUtil.findNode(/backGround/g, node);
            a.setScale(.1, .1, .1);
            cc.tween(a).to(.2, {
              scale: new cc.Vec3(1, 1, 1)
            }).start();
          },
          onBeforeRemove: function(node, next) {
            var a = ViewUtil_1.ViewUtil.findNode(/backGround/g, node);
            cc.tween(a).to(.2, {
              scale: new cc.Vec3(.1, .1, .1)
            }).call(next).start();
          }
        };
        if (callbacks) {
          if (callbacks && callbacks.onAdded) {
            var onAdded_2 = callbacks.onAdded;
            callbacks.onAdded = function(node, params) {
              onAdded_2(node, params);
              newCallbacks.onAdded(node, params);
            };
          }
          if (callbacks && callbacks.onBeforeRemove) {
            var onBeforeRemove_2 = callbacks.onBeforeRemove;
            callbacks.onBeforeRemove = function(node, params) {
              onBeforeRemove_2(node, params);
              newCallbacks.onBeforeRemove(node, params);
            };
          }
          return callbacks;
        }
        return newCallbacks;
      };
      return TipsManager;
    }();
    exports.tips = new TipsManager();
    cc._RF.pop();
  }, {
    "../../../game/common/config/GameUIConfig": "GameUIConfig",
    "../../Engine": "Engine",
    "../../utils/ViewUtil": "ViewUtil"
  } ],
  TurnTable: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d7c4e8jnwtB6aqH067QgTO4", "TurnTable");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu;
    var SectorType;
    (function(SectorType) {
      SectorType[SectorType["\u7b49\u5206\u6247\u533a"] = 0] = "\u7b49\u5206\u6247\u533a";
      SectorType[SectorType["\u4e0d\u89c4\u5219\u6247\u533a"] = 1] = "\u4e0d\u89c4\u5219\u6247\u533a";
    })(SectorType || (SectorType = {}));
    var SAVERAT = .1;
    var TurnTable = function(_super) {
      __extends(TurnTable, _super);
      function TurnTable() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.time0 = 2;
        _this.time1 = 2;
        _this.time2 = 2;
        _this.type = SectorType.\u7b49\u5206\u6247\u533a;
        _this.sectorNum = 0;
        _this.sector = [];
        _this.markAngle = [];
        _this.angles = [];
        _this.isTurning = false;
        _this.sectorID = 0;
        return _this;
      }
      TurnTable.prototype.start = function() {
        if (this.type === SectorType.\u7b49\u5206\u6247\u533a) {
          var deltAngle = 360 / this.sectorNum;
          var saveAngle = deltAngle * SAVERAT;
          for (var i = 0; i < this.sectorNum; ++i) this.angles.push(i * deltAngle + saveAngle, (i + 1) * deltAngle - saveAngle);
        } else for (var i = 0, len = this.sector.length; i < len; ++i) {
          var sector = this.sector[i];
          var saveAngle = (sector.y - sector.x) * SAVERAT;
          this.angles.push(sector.x + saveAngle, sector.y - saveAngle);
        }
        this.markAngle = [ 180 * this.time0, 720 * this.time1, 180 * this.time0 + 720 * this.time1, 360 * this.time2 ];
      };
      TurnTable.prototype.turnTo = function(id) {
        var _this = this;
        if (this.isTurning) return;
        this.isTurning = true;
        this.sectorID = id;
        var a = this.angles[this.sectorID << 1];
        var b = this.angles[1 + (this.sectorID << 1)];
        cc.tween(this.node).by(this.time0, {
          angle: this.markAngle[0]
        }, {
          easing: "cubicIn"
        }).by(this.time1, {
          angle: this.markAngle[1]
        }).to(this.time2, {
          angle: 360 * ~~((this.node.angle + this.markAngle[2]) / 360) + this.markAngle[3] + ~~((a - b) * Math.random() + b)
        }, {
          easing: "cubicOut"
        }).call(function() {
          _this.isTurning = false;
        }).start();
      };
      __decorate([ property({
        min: 0,
        displayName: false
      }) ], TurnTable.prototype, "time0", void 0);
      __decorate([ property({
        min: 0,
        displayName: false
      }) ], TurnTable.prototype, "time1", void 0);
      __decorate([ property({
        min: 0,
        displayName: false
      }) ], TurnTable.prototype, "time2", void 0);
      __decorate([ property({
        type: cc.Enum(SectorType),
        displayName: false
      }) ], TurnTable.prototype, "type", void 0);
      __decorate([ property({
        type: cc.Integer,
        min: 0,
        displayName: false,
        visible: function() {
          return this.type === SectorType.\u7b49\u5206\u6247\u533a;
        }
      }) ], TurnTable.prototype, "sectorNum", void 0);
      __decorate([ property({
        type: [ cc.Vec2 ],
        displayName: false,
        visible: function() {
          return this.type === SectorType.\u4e0d\u89c4\u5219\u6247\u533a;
        }
      }) ], TurnTable.prototype, "sector", void 0);
      TurnTable = __decorate([ ccclass, menu("Comp/TurnTable") ], TurnTable);
      return TurnTable;
    }(cc.Component);
    exports.default = TurnTable;
    cc._RF.pop();
  }, {} ],
  TweenUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "55eac+SWndN/K5K/WfwVD7F", "TweenUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.TweenEasing = exports.TweenUtil = void 0;
    var TweenUtil;
    (function(TweenUtil) {
      var Ts = function() {
        function Ts() {}
        Ts.speak = function() {
          console.log("111");
        };
        return Ts;
      }();
      TweenUtil.Ts = Ts;
    })(TweenUtil = exports.TweenUtil || (exports.TweenUtil = {}));
    var TweenEasing;
    (function(TweenEasing) {
      TweenEasing["linear"] = "linear";
      TweenEasing["quadIn"] = "quadIn";
      TweenEasing["quadOut"] = "quadOut";
      TweenEasing["quadInOut"] = "quadInOut";
      TweenEasing["cubicIn"] = "cubicIn";
      TweenEasing["cubicOut"] = "cubicOut";
      TweenEasing["cubicInOut"] = "cubicInOut";
      TweenEasing["quartIn"] = "quartIn";
      TweenEasing["quartOut"] = "quartOut";
      TweenEasing["quartInOut"] = "quartInOut";
      TweenEasing["quintIn"] = "quintIn";
      TweenEasing["quintOut"] = "quintOut";
      TweenEasing["quintInOut"] = "quintInOut";
      TweenEasing["sineIn"] = "sineIn";
      TweenEasing["sineOut"] = "sineOut";
      TweenEasing["sineInOut"] = "sineInOut";
      TweenEasing["expoIn"] = "expoIn";
      TweenEasing["expoOut"] = "expoOut";
      TweenEasing["expoInOut"] = "expoInOut";
      TweenEasing["circIn"] = "circIn";
      TweenEasing["circOut"] = "circOut";
      TweenEasing["circInOut"] = "circInOut";
      TweenEasing["elasticIn"] = "elasticIn";
      TweenEasing["elasticOut"] = "elasticOut";
      TweenEasing["elasticInOut"] = "elasticInOut";
      TweenEasing["backIn"] = "backIn";
      TweenEasing["backOut"] = "backOut";
      TweenEasing["backInOut"] = "backInOut";
      TweenEasing["bounceIn"] = "bounceIn";
      TweenEasing["bounceOut"] = "bounceOut";
      TweenEasing["bounceInOut"] = "bounceInOut";
      TweenEasing["smooth"] = "smooth";
      TweenEasing["fade"] = "fade";
    })(TweenEasing = exports.TweenEasing || (exports.TweenEasing = {}));
    cc._RF.pop();
  }, {} ],
  UIConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c1b41Bys5FHDL855bnO0l8J", "UIConfig");
    "use strict";
    var _a;
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.UIConfigData = void 0;
    var LayerManager_1 = require("../../../core/gui/layer/LayerManager");
    var GameUIConfig_1 = require("./GameUIConfig");
    exports.UIConfigData = (_a = {}, _a[GameUIConfig_1.UIID.Login] = {
      bundle: "common",
      layer: LayerManager_1.LayerType.UI,
      prefab: "login/login"
    }, _a[GameUIConfig_1.UIID.Loading] = {
      bundle: "common",
      layer: LayerManager_1.LayerType.Dialog,
      prefab: "loading/loadingProgress"
    }, _a[GameUIConfig_1.UIID.StartPanel] = {
      bundle: "common",
      layer: LayerManager_1.LayerType.Dialog,
      prefab: "Prefab/StartPanel"
    }, _a[GameUIConfig_1.UIID.Loding] = {
      bundle: "common",
      layer: LayerManager_1.LayerType.UI,
      prefab: "loading/loading"
    }, _a[GameUIConfig_1.UIID.ZshcGamePanel] = {
      bundle: "longHandGame",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/LongHandPanel"
    }, _a[GameUIConfig_1.UIID.Game5] = {
      bundle: "splitGame",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/SplitGamePanel"
    }, _a[GameUIConfig_1.UIID.Game6] = {
      bundle: "pro_screwlevel",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/pro_screwlevel"
    }, _a[GameUIConfig_1.UIID.Game7] = {
      bundle: "cuttherope",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/cuttherope"
    }, _a[GameUIConfig_1.UIID.Game8] = {
      bundle: "PaoGame",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/PaoGame"
    }, _a[GameUIConfig_1.UIID.Game9] = {
      bundle: "CableShape",
      layer: LayerManager_1.LayerType.UI,
      prefab: "prefab/CableShape"
    }, _a);
    cc._RF.pop();
  }, {
    "../../../core/gui/layer/LayerManager": "LayerManager",
    "./GameUIConfig": "GameUIConfig"
  } ],
  UIMap: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f2e2eWT1opPVaR5BDSaUKdm", "UIMap");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.UIMap = void 0;
    var TreeNode = function() {
      function TreeNode() {
        this.parent = null;
        this.child = [];
      }
      return TreeNode;
    }();
    var UIMap = function() {
      function UIMap() {
        this.nodes = new Map();
      }
      UIMap.prototype.init = function(manager, data) {
        var _this = this;
        this.manager = manager;
        for (var key in data) {
          var d = data[key];
          var n = new TreeNode();
          n.id = parseInt(key);
          n.pid = d.parent;
          n.name = d.name;
          n.panel = d.panel;
          this.nodes.set(n.id, n);
        }
        this.nodes.forEach(function(value, key) {
          value.parent = _this.nodes.get(value.pid);
          value.parent && value.parent.child.push(value);
        });
      };
      UIMap.prototype.pathFinding = function(startId, endId) {
        var _this = this;
        var start = this.nodes.get(startId);
        var end = this.nodes.get(endId);
        var close = this.findUp(start);
        var open = this.findUp(end);
        close.forEach(function(value) {
          _this.manager.remove(value.id, true);
        });
        open.forEach(function(value) {
          _this.manager.open(value.id);
        });
        return {
          paths_close: close,
          paths_open: open
        };
      };
      UIMap.prototype.findUp = function(start) {
        var paths = [];
        var current = start;
        while (null != current.parent) {
          paths.push(current);
          current = current.parent;
        }
        return paths;
      };
      UIMap.prototype.release = function() {
        this.nodes.clear();
      };
      return UIMap;
    }();
    exports.UIMap = UIMap;
    cc._RF.pop();
  }, {} ],
  UISplitImage: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "996f7zT9glIeIDUEMrxXH/u", "UISplitImage");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var TexturePlus_1 = require("../SpecialEffect/TexturePlus");
    var Plolygon_1 = require("./Plolygon");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var UISplitImage = function(_super) {
      __extends(UISplitImage, _super);
      function UISplitImage() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.textureRoot = null;
        _this.graphics = null;
        _this.spriteFrame = null;
        _this.pic = null;
        _this.textures = [];
        _this.startPoint = null;
        _this.endPoint = null;
        _this.jingque = 32;
        _this.apl = null;
        return _this;
      }
      UISplitImage.prototype.onLoad = function() {
        cc.director.getPhysicsManager().enabled = true;
        cc.director.getCollisionManager().enabled = true;
      };
      UISplitImage.prototype.start = function() {
        this.init();
        this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
        this.graphics.node.x = -cc.visibleRect.width / 2;
        this.graphics.node.y = -cc.visibleRect.height / 2;
      };
      UISplitImage.prototype.init = function() {
        null != this.spriteFrame && (this.pic = this.spriteFrame.getTexture());
        var node = new cc.Node();
        var t = node.addComponent(TexturePlus_1.default);
        node.parent = this.textureRoot;
        t.texture = this.pic;
        this.textures.push(t);
      };
      UISplitImage.prototype.onTouchStart = function(e) {
        this.startPoint = e.getLocation();
      };
      UISplitImage.prototype.onTouchMove = function(e) {
        this.graphics.clear();
        this.graphics.moveTo(this.startPoint.x, this.startPoint.y);
        var p = e.getLocation();
        this.graphics.lineTo(p.x, p.y);
        this.graphics.stroke();
      };
      UISplitImage.prototype.onTouchEnd = function(e) {
        this.graphics.clear();
        this.endPoint = e.getLocation();
        this.useLineCutPolygon(this.startPoint, this.endPoint);
      };
      UISplitImage.prototype.doSplit = function() {
        var h = this.pic.height, w = this.pic.width;
        for (var i = 0; i < 15; i++) {
          var p0 = cc.v2(-(w / 2 + 10), Math.random() * h - h / 2);
          var p1 = cc.v2(w / 2 + 10, Math.random() * h - h / 2);
          this.useLineCutPolygon(p0, p1, false);
        }
        for (var i = 0; i < 15; i++) {
          var p0 = cc.v2(Math.random() * w - w / 2, -(h / 2 + 10));
          var p1 = cc.v2(Math.random() * w - w / 2, h / 2 + 10);
          this.useLineCutPolygon(p0, p1, false);
        }
      };
      UISplitImage.prototype.useLineCutPolygon = function(p0, p1, isWorld) {
        void 0 === isWorld && (isWorld = true);
        for (var i = 0; i < this.textures.length; i++) null == this.textures[i].node && this.textures.splice(i, 1);
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          var pa = p0.clone();
          var pb = p1.clone();
          if (isWorld) {
            pa = texture.node.convertToNodeSpaceAR(p0);
            pb = texture.node.convertToNodeSpaceAR(p1);
          }
          var polygons = Plolygon_1.Plolygon.lineCutPolygon(pa, pb, texture.polygon);
          if (polygons.length <= 0) continue;
          this.splitTexture(texture, polygons);
        }
      };
      UISplitImage.prototype.splitTexture = function(texture, polygons) {
        texture.polygon = polygons[0];
        for (var i = 1; i < polygons.length; i++) {
          var node = new cc.Node();
          var t = node.addComponent(TexturePlus_1.default);
          node.parent = this.textureRoot;
          node.setPosition(texture.node.position);
          t.texture = this.pic;
          t.polygon = polygons[1];
          this.textures.push(t);
          node.addComponent(cc.RigidBody);
          node.addComponent(cc.PhysicsPolygonCollider);
          node.getComponent(cc.PhysicsPolygonCollider).points.length = t.polygon.length;
          for (var j = 0; j < t.polygon.length; j++) node.getComponent(cc.PhysicsPolygonCollider).points[j] = t.polygon[j];
          node.getComponent(cc.PhysicsPolygonCollider).apply();
        }
      };
      UISplitImage.prototype.onClickFly = function() {
        for (var i = 0; i < this.textures.length; i++) {
          var center = this.getPolygonCenter(this.textures[i].polygon);
          var dir = center.normalize();
          cc.tween(this.textures[i].node).by(5, {
            x: 500 * dir.x,
            y: 500 * dir.y
          }).start();
        }
      };
      UISplitImage.prototype.onClickReset = function() {
        var _this = this;
        var _loop_1 = function(i) {
          var center = this_1.getPolygonCenter(this_1.textures[i].polygon);
          var dir = center.normalize();
          cc.tween(this_1.textures[i].node).by(5, {
            x: 500 * -dir.x,
            y: 500 * -dir.y
          }).call(function() {
            if (i === _this.textures.length - 1) {
              _this.textureRoot.destroyAllChildren();
              _this.textureRoot.removeAllChildren();
              _this.textures = [];
              _this.init();
            }
          }).start();
        };
        var this_1 = this;
        for (var i = 0; i < this.textures.length; i++) _loop_1(i);
      };
      UISplitImage.prototype.onFallDown = function() {
        for (var i = 0; i < this.textures.length; i++) {
          var center = this.getPolygonCenter(this.textures[i].polygon);
          cc.tween(this.textures[i].node).delay((center.y + this.pic.height) / this.pic.height).by(2, {
            y: -500
          }, cc.easeCircleActionIn()).start();
        }
      };
      UISplitImage.prototype.onResetFallDown = function() {};
      UISplitImage.prototype.getPolygonCenter = function(polygon) {
        var x = 0, y = 0;
        for (var i = 0; i < polygon.length; i++) {
          x += polygon[i].x;
          y += polygon[i].y;
        }
        x /= polygon.length;
        y /= polygon.length;
        return cc.v2(x, y);
      };
      __decorate([ property(cc.Node) ], UISplitImage.prototype, "textureRoot", void 0);
      __decorate([ property(cc.Graphics) ], UISplitImage.prototype, "graphics", void 0);
      __decorate([ property(cc.SpriteFrame) ], UISplitImage.prototype, "spriteFrame", void 0);
      __decorate([ property(cc.Texture2D) ], UISplitImage.prototype, "pic", void 0);
      UISplitImage = __decorate([ ccclass ], UISplitImage);
      return UISplitImage;
    }(cc.Component);
    exports.default = UISplitImage;
    cc._RF.pop();
  }, {
    "../SpecialEffect/TexturePlus": "TexturePlus",
    "./Plolygon": "Plolygon"
  } ],
  UISplitTexture: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f1433URPulDMK1FU1OTPFL8", "UISplitTexture");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PolygonUtil_1 = require("./PolygonUtil");
    var TexturePlusNew_1 = require("./TexturePlusNew");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var UISplitTexture = function(_super) {
      __extends(UISplitTexture, _super);
      function UISplitTexture() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.textureRoot = null;
        _this.graphics = null;
        _this.texturePlus = null;
        _this.label = null;
        _this.success = null;
        _this.fail = null;
        _this.pic = null;
        _this.canSplit = false;
        _this.touchObj = null;
        _this.textures = [];
        _this.startPoint = null;
        _this.endPoint = null;
        _this.totalCount = 2;
        _this._leftCount = 2;
        return _this;
      }
      Object.defineProperty(UISplitTexture.prototype, "leftCount", {
        get: function() {
          return this._leftCount;
        },
        set: function(value) {
          this._leftCount = value;
          this.label.string = "\u5269\u4f59\u6b21\u6570 : " + this.leftCount;
        },
        enumerable: false,
        configurable: true
      });
      UISplitTexture.prototype.start = function() {
        this.init();
        this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
        this.graphics.node.x = -cc.visibleRect.width / 2;
        this.graphics.node.y = -cc.visibleRect.height / 2;
        this.leftCount = this.totalCount;
      };
      UISplitTexture.prototype.init = function() {
        this.pic = this.texturePlus.texture;
        this.texturePlus._updateMaterial();
        this.textures.push(this.texturePlus);
      };
      UISplitTexture.prototype.onTouchStart = function(e) {
        this.startPoint = e.getLocation();
        this.getTouchObj(this.startPoint);
      };
      UISplitTexture.prototype.onTouchMove = function(e) {
        var p = e.getLocation();
        if (this.touchObj) {
          this.touchObj.setPosition(this.touchObj.parent.convertToNodeSpaceAR(cc.Camera.main.getCameraToWorldPoint(p)));
          return;
        }
        this.drawDashedLine(this.startPoint, p);
      };
      UISplitTexture.prototype.onTouchEnd = function(e) {
        if (this.touchObj) {
          this.dropObj(e.getLocation());
          this.touchObj = null;
          return;
        }
        this.graphics.clear();
        if (!this.canSplit) return;
        this.endPoint = e.getLocation();
        this.startPoint = cc.Camera.main.getCameraToWorldPoint(this.startPoint);
        this.endPoint = cc.Camera.main.getCameraToWorldPoint(this.endPoint);
        this.useLineCutPolygon(this.startPoint, this.endPoint);
        this.onClickFly();
      };
      UISplitTexture.prototype.drawDashedLine = function(p0, p1) {
        this.graphics.clear();
        this.checkCanSplit(p0, p1);
        var length = cc.Vec2.distance(p0, p1);
        var dir = p1.sub(p0);
        var lineLen = 100;
        var spaceLen = 20;
        var curLen = 0;
        for (var i = 0; i < length / (lineLen + spaceLen); i++) {
          this.graphics.moveTo(p0.x, p0.y);
          var addLen = lineLen;
          curLen += lineLen;
          curLen > length && (addLen = lineLen - (curLen - length));
          p0 = p0.add(dir.normalize().multiplyScalar(addLen));
          this.graphics.lineTo(p0.x, p0.y);
          addLen = spaceLen;
          curLen += spaceLen;
          if (curLen > length) {
            addLen = spaceLen - (curLen - length);
            if (0 == addLen) break;
          }
          p0 = p0.add(dir.normalize().multiplyScalar(addLen));
        }
        this.graphics.stroke();
      };
      UISplitTexture.prototype.getTextureByNode = function(node) {
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          if (this.textures[i].node == node) return this.textures[i];
        }
      };
      UISplitTexture.prototype.dropObj = function(p0) {
        p0 = cc.Camera.main.getCameraToWorldPoint(p0);
        var texture = this.getTextureByNode(this.touchObj.parent);
        if (PolygonUtil_1.PolygonUtil.relationPointToPolygon(this.touchObj.parent.convertToNodeSpaceAR(p0), texture.polygon) >= 0) {
          this.touchObj = null;
          return;
        }
        this.touchObj.destroy();
      };
      UISplitTexture.prototype.getTouchObj = function(p0) {
        p0 = cc.Camera.main.getCameraToWorldPoint(p0);
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          for (var j = 0; j < texture.node.children.length; j++) {
            var element = texture.node.children[j];
            if ("2" == element.name && this.isPointInNode(p0, element)) {
              this.touchObj = element;
              return;
            }
          }
        }
      };
      UISplitTexture.prototype.isPointInNode = function(p0, element) {
        var pa1 = element.convertToNodeSpaceAR(p0);
        var l = -element.width / 2, b = -element.height / 2, t = element.height / 2, r = element.width / 2;
        var polygon = [ cc.v2(l, b), cc.v2(r, b), cc.v2(r, t), cc.v2(l, t) ];
        if (PolygonUtil_1.PolygonUtil.relationPointToPolygon(pa1, polygon) >= 0) return true;
        return false;
      };
      UISplitTexture.prototype.checkCanSplit = function(p0, p1) {
        p0 = cc.Camera.main.getCameraToWorldPoint(p0);
        p1 = cc.Camera.main.getCameraToWorldPoint(p1);
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          var pa = p0.clone();
          var pb = p1.clone();
          true;
          pa = texture.node.convertToNodeSpaceAR(p0);
          pb = texture.node.convertToNodeSpaceAR(p1);
          if (PolygonUtil_1.PolygonUtil.relationPointToPolygon(pa, texture.polygon) >= 0 || PolygonUtil_1.PolygonUtil.relationPointToPolygon(pb, texture.polygon) >= 0) {
            this.canSplit = false;
            this.graphics.strokeColor = cc.Color.RED;
            return;
          }
          for (var j = 0; j < texture.node.children.length; j++) {
            var element = texture.node.children[j];
            var pa1 = element.convertToNodeSpaceAR(p0);
            var pb1 = element.convertToNodeSpaceAR(p1);
            var l = -element.width / 2, b = -element.height / 2, t = element.height / 2, r = element.width / 2;
            var polygon = [ cc.v2(l, b), cc.v2(r, b), cc.v2(r, t), cc.v2(l, t) ];
            if (PolygonUtil_1.PolygonUtil.lineCutPolygon(pa1, pb1, polygon).length > 0) {
              this.canSplit = false;
              this.graphics.strokeColor = cc.Color.RED;
              return;
            }
          }
          var polygons = PolygonUtil_1.PolygonUtil.lineCutPolygon(pa, pb, texture.polygon);
          this.canSplit = polygons.length > 0;
          this.graphics.strokeColor = this.canSplit ? cc.Color.GREEN : cc.Color.RED;
        }
      };
      UISplitTexture.prototype.checkEnd = function() {
        if (this.leftCount <= 0) {
          for (var i = this.textures.length - 1; i >= 0; i--) for (var j = 0; j < this.textures[i].node.children.length; j++) {
            var element = this.textures[i].node.children[j];
            if ("0" != element.name) {
              this.fail.active = true;
              return;
            }
          }
          this.success.active = true;
        }
      };
      UISplitTexture.prototype.doSplit = function() {
        var h = this.pic.height, w = this.pic.width;
        for (var i = 0; i < 15; i++) {
          var p0 = cc.v2(-(w / 2 + 10), Math.random() * h - h / 2);
          var p1 = cc.v2(w / 2 + 10, Math.random() * h - h / 2);
          this.useLineCutPolygon(p0, p1, false);
        }
        for (var i = 0; i < 15; i++) {
          var p0 = cc.v2(Math.random() * w - w / 2, -(h / 2 + 10));
          var p1 = cc.v2(Math.random() * w - w / 2, h / 2 + 10);
          this.useLineCutPolygon(p0, p1, false);
        }
      };
      UISplitTexture.prototype.useLineCutPolygon = function(p0, p1, isWorld) {
        void 0 === isWorld && (isWorld = true);
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          var pa = p0.clone();
          var pb = p1.clone();
          if (isWorld) {
            pa = texture.node.convertToNodeSpaceAR(p0);
            pb = texture.node.convertToNodeSpaceAR(p1);
          }
          var polygons = PolygonUtil_1.PolygonUtil.lineCutPolygon(pa, pb, texture.polygon);
          if (polygons.length <= 0) continue;
          this.splitTexture(texture, polygons);
        }
      };
      UISplitTexture.prototype.splitTexture = function(texture, polygons) {
        texture.polygon = polygons[0];
        texture.flyFlag = true;
        var childrens = texture.node.children;
        var length = childrens.length;
        for (var i = 1; i < polygons.length; i++) {
          var node = new cc.Node();
          var t = node.addComponent(TexturePlusNew_1.default);
          node.parent = this.textureRoot;
          node.setPosition(texture.node.position);
          t.texture = this.pic;
          t.polygon = polygons[i];
          t.flyFlag = true;
          this.textures.push(t);
          for (var j = length - 1; j >= 0; j--) {
            var element = childrens[j];
            0 == PolygonUtil_1.PolygonUtil.relationPointToPolygon(cc.v2(element.position.x, element.position.y), t.polygon) && (element.parent = node);
          }
        }
      };
      UISplitTexture.prototype.onClickFly = function() {
        var _this = this;
        this.leftCount--;
        var _loop_1 = function(i) {
          if (this_1.textures[i].flyFlag) {
            this_1.textures[i].flyFlag = false;
            var center = this_1.getPolygonCenter(this_1.textures[i].polygon, this_1.textures[i].node);
            var dir = center.normalize();
            cc.tween(this_1.textures[i].node).by(1, {
              x: 10 * dir.x,
              y: 10 * dir.y
            }).call(function() {
              for (var j = 0; j < _this.textures[i].node.children.length; j++) {
                var element = _this.textures[i].node.children[j];
                if ("0" == element.name) return;
              }
              _this.textures[i].node.destroy();
              _this.textures.splice(i, 1);
              _this.checkEnd();
            }).start();
          }
        };
        var this_1 = this;
        for (var i = this.textures.length - 1; i >= 0; i--) _loop_1(i);
      };
      UISplitTexture.prototype.onClickReset = function() {
        var _this = this;
        var _loop_2 = function(i) {
          var center = this_2.getPolygonCenter(this_2.textures[i].polygon);
          var dir = center.normalize();
          cc.tween(this_2.textures[i].node).by(5, {
            x: 500 * -dir.x,
            y: 500 * -dir.y
          }).call(function() {
            if (i === _this.textures.length - 1) {
              _this.textureRoot.destroyAllChildren();
              _this.textureRoot.removeAllChildren();
              _this.textures = [];
              _this.init();
            }
          }).start();
        };
        var this_2 = this;
        for (var i = 0; i < this.textures.length; i++) _loop_2(i);
      };
      UISplitTexture.prototype.onFallDown = function() {
        for (var i = 0; i < this.textures.length; i++) {
          var center = this.getPolygonCenter(this.textures[i].polygon);
          cc.tween(this.textures[i].node).delay((center.y + this.pic.height) / this.pic.height).by(2, {
            y: -500
          }, cc.easeCircleActionIn()).start();
        }
      };
      UISplitTexture.prototype.onResetFallDown = function() {};
      UISplitTexture.prototype.getPolygonCenter = function(polygon, node) {
        void 0 === node && (node = null);
        var sign = 0;
        var vec1 = this.endPoint.clone().subtract(this.startPoint);
        for (var i = 0; i < polygon.length; i++) {
          var p = node.convertToWorldSpaceAR(cc.v3(polygon[i].x, polygon[i].y));
          var vec2 = cc.v2(p.x, p.y).subtract(this.startPoint);
          sign += vec1.cross(vec2);
        }
        if (sign > 0) return cc.v2(-vec1.y, vec1.x);
        if (sign < 0) return cc.v2(vec1.y, -vec1.x);
        return cc.v2();
      };
      UISplitTexture.prefabPath = "UIForms/UISplitTexture";
      __decorate([ property(cc.Node) ], UISplitTexture.prototype, "textureRoot", void 0);
      __decorate([ property(cc.Graphics) ], UISplitTexture.prototype, "graphics", void 0);
      __decorate([ property(TexturePlusNew_1.default) ], UISplitTexture.prototype, "texturePlus", void 0);
      __decorate([ property(cc.Label) ], UISplitTexture.prototype, "label", void 0);
      __decorate([ property(cc.Node) ], UISplitTexture.prototype, "success", void 0);
      __decorate([ property(cc.Node) ], UISplitTexture.prototype, "fail", void 0);
      UISplitTexture = __decorate([ ccclass ], UISplitTexture);
      return UISplitTexture;
    }(cc.Component);
    exports.default = UISplitTexture;
    cc._RF.pop();
  }, {
    "./PolygonUtil": "PolygonUtil",
    "./TexturePlusNew": "TexturePlusNew"
  } ],
  UrlParse: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f36cbZ1MnxEmJRRZMS6tAMI", "UrlParse");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.UrlParse = void 0;
    var UrlParse = function() {
      function UrlParse() {
        this._data = null;
        if (!cc.sys.isBrowser) {
          this._data = {};
          return;
        }
        this._data = this.parseUrl();
      }
      Object.defineProperty(UrlParse.prototype, "query", {
        get: function() {
          return this._data;
        },
        enumerable: false,
        configurable: true
      });
      UrlParse.prototype.parseUrl = function() {
        if ("object" !== typeof window) return {};
        if (!window.document) return {};
        var url = window.document.location.href.toString();
        var u = url.split("?");
        if ("string" == typeof u[1]) {
          u = u[1].split("&");
          var get = {};
          for (var i = 0, l = u.length; i < l; ++i) {
            var j = u[i].split("=");
            get[j[0]] = j[1];
          }
          return get;
        }
        return {};
      };
      return UrlParse;
    }();
    exports.UrlParse = UrlParse;
    cc._RF.pop();
  }, {} ],
  UserBehaviorManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "bc289DPUFlK14qy01fs2L/G", "UserBehaviorManager");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.StayRecorder = exports.RecordData = exports.ResourceType = exports.RecordType = void 0;
    var Logger_1 = require("../common/log/Logger");
    var Engine_1 = require("../Engine");
    var RecordType;
    (function(RecordType) {
      RecordType[RecordType["UI"] = 0] = "UI";
      RecordType[RecordType["Ad"] = 1] = "Ad";
      RecordType[RecordType["Scene"] = 2] = "Scene";
    })(RecordType = exports.RecordType || (exports.RecordType = {}));
    var ResourceType;
    (function(ResourceType) {
      ResourceType[ResourceType["GetGold"] = 0] = "GetGold";
      ResourceType[ResourceType["UseGold"] = 1] = "UseGold";
      ResourceType[ResourceType["GetEquipPiece"] = 2] = "GetEquipPiece";
      ResourceType[ResourceType["UseEquipPiece"] = 3] = "UseEquipPiece";
      ResourceType[ResourceType["GetEquip"] = 4] = "GetEquip";
      ResourceType[ResourceType["GetGenshin"] = 5] = "GetGenshin";
      ResourceType[ResourceType["GetSkill"] = 6] = "GetSkill";
      ResourceType[ResourceType["GetBox"] = 7] = "GetBox";
    })(ResourceType = exports.ResourceType || (exports.ResourceType = {}));
    var RecordData = function() {
      function RecordData(eventName, eventParam) {
        this.eventParamArray = [];
        this.eventName = eventName;
        this.eventParamArray.push(eventParam);
      }
      return RecordData;
    }();
    exports.RecordData = RecordData;
    var StayRecorder = function() {
      function StayRecorder(type, id) {
        this.uuid = RecordType[type] + id;
        this.type = type;
        this.id = id;
        this.startDate = Date.now();
        this.totalTime = 0;
        this.statu = true;
        this.count = 1;
      }
      StayRecorder.prototype.restart = function() {
        if (this.statu) {
          Logger_1.Logger.erroring("StayRecorder restart \u6709\u8bef\uff0c \u8bf7\u68c0\u67e5 \uff0c uuid : " + this.uuid);
          return;
        }
        this.startDate = Date.now();
        this.statu = true;
        this.count++;
      };
      StayRecorder.prototype.close = function() {
        if (!this.statu) {
          Logger_1.Logger.erroring("StayRecorder close \u6709\u8bef\uff0c \u8bf7\u68c0\u67e5 \uff0c uuid : " + this.uuid);
          return;
        }
        this.totalTime += Date.now() - this.startDate;
        this.statu = false;
      };
      StayRecorder.prototype.getTotalTime = function() {
        return this.statu ? Date.now() - this.startDate + this.totalTime : this.totalTime;
      };
      StayRecorder.prototype.reset = function() {
        this.statu && (this.startDate = Date.now());
        this.totalTime = 0;
        this.count = 0;
      };
      StayRecorder.prototype.toString = function() {
        Logger_1.Logger.logView("uuid : " + this.uuid + "  type : " + this.type + "  id : " + this.id + "  startDate : " + this.startDate + "  statu : " + this.statu + "  count : " + this.count);
      };
      return StayRecorder;
    }();
    exports.StayRecorder = StayRecorder;
    var UserBehaviorManager = function(_super) {
      __extends(UserBehaviorManager, _super);
      function UserBehaviorManager() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.recordArray = [];
        _this.stayRecorderMap = new Map();
        _this.sendInterval = 120;
        _this.adRecorderMap = new Map();
        _this.buttonRecorderMap = new Map();
        _this.operateRecorderMap = new Map();
        _this.resourceRecorderMap = new Map();
        return _this;
      }
      Object.defineProperty(UserBehaviorManager, "instance", {
        get: function() {
          if (null == this._instance) {
            console.log("UserBehaviorManager");
            var node = new cc.Node("UserBehaviorManager");
            cc.game.addPersistRootNode(node);
            this._instance = node.addComponent(UserBehaviorManager);
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      UserBehaviorManager.prototype.adPlayRecord = function(adtype, isPlayingFinished, playTotalTime, from) {
        var params = {
          adType: adtype,
          isPlayingFinished: isPlayingFinished,
          playTotalTime: playTotalTime,
          from: from
        };
        this.push("Event_AdPlayRecord", params);
      };
      UserBehaviorManager.prototype.adRecord_Start = function(adtype, adId) {
        Logger_1.Logger.logInterface("adRecord_Start  adtype: " + adtype + "   adId : " + adId);
        if (this.adRecorderMap.has(adId)) {
          Logger_1.Logger.erroring("adRecorderMap \u5df2\u6709\u6b64\u503c\uff0c\u8bf7\u68c0\u67e5\u91cd\u590d\uff0cadtype : " + adtype + "  ,adId : " + adId);
          return;
        }
        this.adRecorderMap.set(adId, Date.now());
      };
      UserBehaviorManager.prototype.adRecord_End = function(adtype, adId, isPlayingFinished) {
        Logger_1.Logger.logInterface("adRecord_End  adtype: " + adtype + "   adId : " + adId + "  isPlayingFinished : " + isPlayingFinished);
        if (!this.adRecorderMap.has(adId)) {
          Logger_1.Logger.erroring("adRecorderMap \u6ca1\u6709\u6b64\u503c\uff0c \u8bf7\u68c0\u67e5\uff0c adtype : " + adtype + "  ,adId : " + adId);
          return;
        }
        var t = Date.now() - this.adRecorderMap.get(adId);
        this.adPlayRecord(adtype, isPlayingFinished, t, this.currentUiId);
        this.adRecorderMap.delete(adId);
      };
      UserBehaviorManager.prototype.shareRecord = function(isSharesuccess) {
        var params = {
          isSharesuccess: isSharesuccess,
          from: this.currentUiId
        };
        this.push("Event_ShareRecord", params);
      };
      UserBehaviorManager.prototype.uiStayRecord = function(uiId, stayTime, count) {
        var params = {
          uiId: uiId,
          stayTime: stayTime,
          count: count
        };
        this.push("Event_UIStayRecord", params);
      };
      UserBehaviorManager.prototype.sceneStayRecord = function(sceneId, stayTime, count) {
        var params = {
          sceneId: sceneId,
          stayTime: stayTime,
          count: count
        };
        this.push("Event_SceneStayRecord", params);
      };
      UserBehaviorManager.prototype.stayRecord_Start = function(recordType, uiId) {
        Logger_1.Logger.logInterface("Start RecordType : " + recordType + "   uiId : " + uiId);
        this.add(new StayRecorder(recordType, uiId));
      };
      UserBehaviorManager.prototype.stayRecord_End = function(recordType, uiId) {
        Logger_1.Logger.logInterface("End RecordType : " + recordType + "   uiId : " + uiId);
        this.remove(recordType, uiId);
      };
      UserBehaviorManager.prototype.stayRecord_Clear = function(recordType) {
        var _this = this;
        this.stayRecorderMap && this.stayRecorderMap.forEach(function(item) {
          item.type == recordType && item.statu && _this.stayRecord_End(recordType, item.id);
        });
      };
      UserBehaviorManager.prototype.add = function(stayRecorder) {
        if (this.stayRecorderMap.has(stayRecorder.uuid)) {
          if (this.stayRecorderMap.get(stayRecorder.uuid).statu) {
            Logger_1.Logger.erroring("stayRecorderMap \u5df2\u6709\u6b64\u503c\uff0c\u5e76\u4e14\u672a\u5173\u95ed\uff0c\u8bf7\u68c0\u67e5\u91cd\u590d\uff0c uuid : " + stayRecorder.uuid);
            return;
          }
          this.stayRecorderMap.get(stayRecorder.uuid).restart();
        } else this.stayRecorderMap.set(stayRecorder.uuid, stayRecorder);
        stayRecorder.type == RecordType.UI && (this.currentUiId = stayRecorder.id);
      };
      UserBehaviorManager.prototype.remove = function(type, id) {
        var uuid = RecordType[type] + id;
        if (!this.stayRecorderMap.has(uuid)) {
          Logger_1.Logger.erroring("stayRecorderMap \u6ca1\u6709\u6b64\u503c\uff0c\u8bf7\u68c0\u67e5\uff0c uuid : " + uuid);
          return;
        }
        this.stayRecorderMap.get(uuid).close();
      };
      UserBehaviorManager.prototype.buttonRecord = function(buttonId) {
        var count;
        if (this.buttonRecorderMap.has(buttonId)) {
          count = this.buttonRecorderMap.get(buttonId);
          count++;
        } else count = 1;
        this.buttonRecorderMap.set(buttonId, count);
      };
      UserBehaviorManager.prototype.buttonRecordSort = function(buttonId, count) {
        var params = {
          buttonId: buttonId,
          count: count
        };
        this.push("Event_ButtonRecord", params);
      };
      UserBehaviorManager.prototype.resourceRecord = function(resourceType, amount) {
        var count;
        count = this.resourceRecorderMap.has(resourceType) ? this.resourceRecorderMap.get(resourceType) : 0;
        count += amount;
        this.resourceRecorderMap.set(resourceType, count);
      };
      UserBehaviorManager.prototype.resourceRecordSort = function(resourceType, amount) {
        var params = {
          resourceType: resourceType,
          amount: amount,
          from: "1"
        };
        this.push("Event_ResourceRecord", params);
      };
      UserBehaviorManager.prototype.operateRecord = function(operateId) {
        var count;
        if (this.operateRecorderMap.has(operateId)) {
          count = this.operateRecorderMap.get(operateId);
          count++;
        } else count = 1;
        this.operateRecorderMap.set(operateId, count);
      };
      UserBehaviorManager.prototype.operateRecordSort = function(operateId, count) {
        var params = {
          operateId: operateId,
          count: count
        };
        this.push("Event_OperateRecord", params);
      };
      UserBehaviorManager.prototype.GameTimeRecord = function() {
        var params = {
          sendInterval: this.sendInterval
        };
        this.push("Event_GameTimeRecord", params);
      };
      UserBehaviorManager.prototype.push = function(eventName, eventParams) {
        var recordData = this.recordArray.find(function(e) {
          return e.eventName === eventName;
        });
        recordData ? recordData.eventParamArray.push(eventParams) : this.recordArray.push(new RecordData(eventName, eventParams));
      };
      UserBehaviorManager.prototype.sort = function() {
        var _this = this;
        this.stayRecorderMap && this.stayRecorderMap.forEach(function(item) {
          switch (item.type) {
           case RecordType.UI:
            _this.uiStayRecord(item.id, Math.ceil(item.getTotalTime() / 1e3), item.count);
            break;

           case RecordType.Scene:
            _this.sceneStayRecord(item.id, Math.ceil(item.getTotalTime() / 1e3), item.count);
          }
        });
        if (this.buttonRecorderMap) for (var _i = 0, _a = this.buttonRecorderMap; _i < _a.length; _i++) {
          var _b = _a[_i], key = _b[0], value = _b[1];
          this.buttonRecordSort(key, value);
        }
        if (this.operateRecorderMap) for (var _c = 0, _d = this.operateRecorderMap; _c < _d.length; _c++) {
          var _e = _d[_c], key = _e[0], value = _e[1];
          this.operateRecordSort(key, value);
        }
        if (this.resourceRecorderMap) for (var _f = 0, _g = this.resourceRecorderMap; _f < _g.length; _f++) {
          var _h = _g[_f], key = _h[0], value = _h[1];
          this.resourceRecordSort(key, value);
        }
        this.GameTimeRecord();
      };
      UserBehaviorManager.prototype.reset = function() {
        var _this = this;
        this.stayRecorderMap.forEach(function(value, key) {
          value.statu ? value.reset() : _this.stayRecorderMap.delete(key);
        });
        this.buttonRecorderMap.clear();
        this.operateRecorderMap.clear();
        this.resourceRecorderMap.clear();
        this.recordArray = [];
      };
      UserBehaviorManager.prototype.send = function() {
        var _this = this;
        Engine_1.engine.timer.schedule(function(dt) {
          var successCallback = function() {
            console.log("record success");
          };
          var failCallback = function() {
            console.log("record fail");
          };
          _this.sort();
          Logger_1.Logger.logView("Array : " + JSON.stringify(_this.recordArray));
          _this.reset();
        }, this.sendInterval);
      };
      UserBehaviorManager.prototype.sendCallback = function() {
        var successCallback = function() {
          console.log("record success");
        };
        var failCallback = function() {
          console.log("record fail");
        };
        this.sort();
        Logger_1.Logger.logView("Array : " + JSON.stringify(this.recordArray));
        this.reset();
      };
      return UserBehaviorManager;
    }(cc.Component);
    exports.default = UserBehaviorManager;
    cc._RF.pop();
  }, {
    "../Engine": "Engine",
    "../common/log/Logger": "Logger"
  } ],
  VIVOPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "246baaBEddGB485OSfVMwCx", "VIVOPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.VIVOPlatform = void 0;
    var VIVOPlatform = function() {
      function VIVOPlatform() {
        this.RewardedAdBol = false;
        this.BannerBol = false;
        this.CustomBol = false;
      }
      VIVOPlatform.prototype.init = function() {};
      VIVOPlatform.prototype.login = function(callback) {};
      VIVOPlatform.prototype.request = function(url, data, method, callback) {};
      VIVOPlatform.prototype.getUserInfo = function(callback) {};
      VIVOPlatform.prototype.saveUserInfo = function(userName, url, callback) {};
      VIVOPlatform.prototype.getSystemInfo = function() {};
      VIVOPlatform.prototype.createRewardedAd = function(ADNum) {};
      VIVOPlatform.prototype.showRewardedAd = function(callback) {};
      VIVOPlatform.prototype.createInterstitialAd = function() {};
      VIVOPlatform.prototype.showInterstitialAd = function() {};
      VIVOPlatform.prototype.showBannerAd = function(bannerType, top, left, width, BannerAd) {};
      VIVOPlatform.prototype.hideBannerAd = function() {};
      VIVOPlatform.prototype.CreateCustomAd = function(ADNum, type) {};
      VIVOPlatform.prototype.hideCustomAd = function() {};
      VIVOPlatform.prototype.CreateSquaredUpAd = function(callback) {};
      VIVOPlatform.prototype.SquareUpAdDestroy = function() {};
      VIVOPlatform.prototype.onShare = function(callback) {};
      VIVOPlatform.prototype.addShortcut = function(callback) {};
      VIVOPlatform.prototype.checkShortcut = function(callback) {};
      VIVOPlatform.prototype.vibrateShort = function(vibrateType) {};
      VIVOPlatform.prototype.vibrateLong = function() {};
      VIVOPlatform.prototype.exitGame = function() {};
      return VIVOPlatform;
    }();
    exports.VIVOPlatform = VIVOPlatform;
    cc._RF.pop();
  }, {} ],
  VMBase: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2ff70QplcpCm5NF573+6CA5", "VMBase");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ViewModel_1 = require("./ViewModel");
    var DEBUG_WATCH_PATH = false;
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var VMBase = function(_super) {
      __extends(VMBase, _super);
      function VMBase() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.watchPath = "";
        _this.watchPathArr = [];
        _this.templateMode = false;
        _this.templateValueArr = [];
        _this.VM = ViewModel_1.VM;
        return _this;
      }
      VMBase.prototype.onLoad = function() {
        var _this = this;
        false;
        var paths = this.watchPath.split(".");
        for (var i = 1; i < paths.length; i++) {
          var p = paths[i];
          if ("*" == p) {
            var index = this.node.parent.children.findIndex(function(n) {
              return n === _this.node;
            });
            index <= 0 && (index = 0);
            paths[i] = index.toString();
            break;
          }
        }
        this.watchPath = paths.join(".");
        var pathArr = this.watchPathArr;
        if (pathArr.length >= 1) for (var i = 0; i < pathArr.length; i++) {
          var path = pathArr[i];
          var paths_1 = path.split(".");
          for (var i_1 = 1; i_1 < paths_1.length; i_1++) {
            var p = paths_1[i_1];
            if ("*" == p) {
              var index = this.node.parent.children.findIndex(function(n) {
                return n === _this.node;
              });
              index <= 0 && (index = 0);
              paths_1[i_1] = index.toString();
              break;
            }
          }
          this.watchPathArr[i] = paths_1.join(".");
        }
        DEBUG_WATCH_PATH && true && cc.log("\u6240\u6709\u8def\u5f84", this.watchPath ? [ this.watchPath ] : this.watchPathArr, "<<", this.node.getParent().name + "." + this.node.name);
        "" == this.watchPath && "" == this.watchPathArr.join("") && cc.log("\u53ef\u80fd\u672a\u8bbe\u7f6e\u8def\u5f84\u7684\u8282\u70b9:", this.node.parent.name + "." + this.node.name);
      };
      VMBase.prototype.onEnable = function() {
        false;
        this.templateMode ? this.setMultPathEvent(true) : "" != this.watchPath && this.VM.bindPath(this.watchPath, this.onValueChanged, this);
        this.onValueInit();
      };
      VMBase.prototype.onDisable = function() {
        false;
        this.templateMode ? this.setMultPathEvent(false) : "" != this.watchPath && this.VM.unbindPath(this.watchPath, this.onValueChanged, this);
      };
      VMBase.prototype.setMultPathEvent = function(enabled) {
        void 0 === enabled && (enabled = true);
        false;
        var arr = this.watchPathArr;
        for (var i = 0; i < arr.length; i++) {
          var path = arr[i];
          enabled ? this.VM.bindPath(path, this.onValueChanged, this) : this.VM.unbindPath(path, this.onValueChanged, this);
        }
      };
      VMBase.prototype.onValueInit = function() {};
      VMBase.prototype.onValueChanged = function(n, o, pathArr) {};
      VMBase = __decorate([ ccclass ], VMBase);
      return VMBase;
    }(cc.Component);
    exports.default = VMBase;
    cc._RF.pop();
  }, {
    "./ViewModel": "ViewModel"
  } ],
  VMCompsEdit: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "102500Oi6BHlZES26TVoN4h", "VMCompsEdit");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, executeInEditMode = _a.executeInEditMode, menu = _a.menu, help = _a.help;
    var ACTION_MODE;
    (function(ACTION_MODE) {
      ACTION_MODE[ACTION_MODE["SEARCH_COMPONENT"] = 0] = "SEARCH_COMPONENT";
      ACTION_MODE[ACTION_MODE["ENABLE_COMPONENT"] = 1] = "ENABLE_COMPONENT";
      ACTION_MODE[ACTION_MODE["REPLACE_WATCH_PATH"] = 2] = "REPLACE_WATCH_PATH";
      ACTION_MODE[ACTION_MODE["DELETE_COMPONENT"] = 3] = "DELETE_COMPONENT";
    })(ACTION_MODE || (ACTION_MODE = {}));
    var MVCompsEdit = function(_super) {
      __extends(MVCompsEdit, _super);
      function MVCompsEdit() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.findList = [ "VMBase", "VMParent" ];
        _this.actionType = ACTION_MODE.SEARCH_COMPONENT;
        _this.allowDelete = false;
        _this.targetPath = "game";
        _this.replacePath = "*";
        _this.canCollectNodes = false;
        _this.collectNodes = [];
        return _this;
      }
      Object.defineProperty(MVCompsEdit.prototype, "findTrigger", {
        get: function() {
          return false;
        },
        set: function(v) {
          this.setComponents(0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MVCompsEdit.prototype, "enableTrigger", {
        get: function() {
          return false;
        },
        set: function(v) {
          this.setComponents(1);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MVCompsEdit.prototype, "disableTrigger", {
        get: function() {
          return false;
        },
        set: function(v) {
          this.setComponents(2);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MVCompsEdit.prototype, "deleteTrigger", {
        get: function() {
          return false;
        },
        set: function(v) {
          this.setComponents(3);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MVCompsEdit.prototype, "replaceTrigger", {
        get: function() {
          return false;
        },
        set: function(v) {
          this.setComponents(4);
        },
        enumerable: false,
        configurable: true
      });
      MVCompsEdit.prototype.onLoad = function() {
        true;
        var path = this.getNodePath(this.node);
        console.error("you forget delete MVEditFinder,[path]", path);
      };
      MVCompsEdit.prototype.setComponents = function(state) {
        var _this = this;
        var array = this.findList;
        var title = "\u641c\u7d22\u5230\u5f53\u524d\u8282\u70b9\u4e0b\u9762\u7684\u7ec4\u4ef6";
        switch (state) {
         case 0:
          title = "\u641c\u7d22\u5230\u5f53\u524d\u8282\u70b9\u4e0b\u9762\u7684\u7ec4\u4ef6";
          break;

         case 1:
          title = "\u6fc0\u6d3b\u4ee5\u4e0b\u8282\u70b9\u7684\u7ec4\u4ef6";
          break;

         case 2:
          title = "\u5173\u95ed\u4ee5\u4e0b\u8282\u70b9\u7684\u7ec4\u4ef6";
          break;

         case 3:
          title = "\u5220\u9664\u4ee5\u4e0b\u8282\u70b9\u7684\u7ec4\u4ef6";
          break;

         case 4:
          title = "\u66ff\u6362\u4ee5\u4e0b\u8282\u70b9\u7684\u8def\u5f84";
        }
        cc.log(title);
        cc.log("______________________");
        array.forEach(function(name) {
          _this.searchComponent(name, state);
        });
        cc.log("______________________");
      };
      MVCompsEdit.prototype.searchComponent = function(className, state) {
        var _this = this;
        void 0 === state && (state = 0);
        this.collectNodes = [];
        var comps = this.node.getComponentsInChildren(className);
        if (null == comps || comps.length < 1) return;
        cc.log("[" + className + "]:");
        comps.forEach(function(v) {
          var ext = "";
          state <= 3 && (ext = true === v.templateMode ? v.watchPathArr ? ":[Path:" + v.watchPathArr.join("|") + "]" : "" : v.watchPath ? ":[Path:" + v.watchPath + "]" : "");
          cc.log(_this.getNodePath(v.node) + ext);
          switch (state) {
           case 0:
            _this.canCollectNodes && -1 === _this.collectNodes.indexOf(v.node) && _this.collectNodes.push(v.node);
            break;

           case 1:
            v.enabled = true;
            break;

           case 2:
            v.enabled = false;
            break;

           case 3:
            v.node.removeComponent(v);
            break;

           case 4:
            var targetPath = _this.targetPath;
            var replacePath = _this.replacePath;
            if (true === v.templateMode) for (var i = 0; i < v.watchPathArr.length; i++) {
              var path = v.watchPathArr[i];
              v.watchPathArr[i] = _this.replaceNodePath(path, targetPath, replacePath);
            } else v.watchPath = _this.replaceNodePath(v.watchPath, targetPath, replacePath);
          }
        });
      };
      MVCompsEdit.prototype.replaceNodePath = function(path, search, replace) {
        var pathArr = path.split(".");
        var searchArr = search.split(".");
        var replaceArr = replace.split(".");
        var match = true;
        for (var i = 0; i < searchArr.length; i++) if (pathArr[i] !== searchArr[i]) {
          match = false;
          break;
        }
        if (true === match) {
          for (var i = 0; i < replaceArr.length; i++) pathArr[i] = replaceArr[i];
          cc.log(" \u8def\u5f84\u66f4\u65b0:", path, ">>>", pathArr.join("."));
        }
        return pathArr.join(".");
      };
      MVCompsEdit.prototype.getNodePath = function(node) {
        var parent = node;
        var array = [];
        while (parent) {
          var p = parent.getParent();
          if (!p) break;
          array.push(parent.name);
          parent = p;
        }
        return array.reverse().join("/");
      };
      __decorate([ property({
        type: [ String ]
      }) ], MVCompsEdit.prototype, "findList", void 0);
      __decorate([ property({
        type: cc.Enum(ACTION_MODE)
      }) ], MVCompsEdit.prototype, "actionType", void 0);
      __decorate([ property({
        tooltip: "\u52fe\u9009\u540e,\u4f1a\u81ea\u52a8\u67e5\u627e find list \u4e2d\u586b\u5199\u7684\u7ec4\u4ef6",
        visible: function() {
          return this.actionType === ACTION_MODE.SEARCH_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "findTrigger", null);
      __decorate([ property({
        tooltip: "\u52fe\u9009\u540e,\u4f1a\u6279\u91cf\u6fc0\u6d3b find list \u4e2d\u586b\u5199\u7684\u7ec4\u4ef6",
        visible: function() {
          return this.actionType === ACTION_MODE.ENABLE_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "enableTrigger", null);
      __decorate([ property({
        tooltip: "\u52fe\u9009\u540e,\u4f1a\u6279\u91cf\u5173\u95ed find list \u4e2d\u586b\u5199\u7684\u7ec4\u4ef6",
        visible: function() {
          return this.actionType === ACTION_MODE.ENABLE_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "disableTrigger", null);
      __decorate([ property({
        tooltip: "\u5141\u8bb8\u5220\u9664\u8282\u70b9\u7684\u7ec4\u4ef6,\u786e\u5b9a\u9700\u8981\u79fb\u9664\u8bf7\u52fe\u9009,\u9632\u6b62\u8bef\u64cd\u4f5c",
        visible: function() {
          return this.actionType === ACTION_MODE.DELETE_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "allowDelete", void 0);
      __decorate([ property({
        tooltip: "\u52fe\u9009\u540e,\u4f1a\u6279\u91cf\u5220\u9664 find list \u4e2d\u586b\u5199\u7684\u7ec4\u4ef6",
        displayName: "[ X DELETE X ]",
        visible: function() {
          return this.allowDelete && this.actionType === ACTION_MODE.DELETE_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "deleteTrigger", null);
      __decorate([ property({
        tooltip: "\u52fe\u9009\u540e,\u4f1a\u6279\u91cf\u66ff\u6362\u6389\u6307\u5b9a\u7684\u8def\u5f84",
        visible: function() {
          return this.actionType === ACTION_MODE.REPLACE_WATCH_PATH;
        }
      }) ], MVCompsEdit.prototype, "replaceTrigger", null);
      __decorate([ property({
        tooltip: "\u5339\u914d\u7684\u8def\u5f84,\u5339\u914d\u89c4\u5219: \u641c\u7d22\u5f00\u5934\u4e3a game\u7684\u8def\u5f84",
        visible: function() {
          return this.actionType === ACTION_MODE.REPLACE_WATCH_PATH;
        }
      }) ], MVCompsEdit.prototype, "targetPath", void 0);
      __decorate([ property({
        tooltip: "\u66ff\u6362\u7684\u8def\u5f84,\u5c06\u5339\u914d\u5230\u7684\u8def\u5f84\u66ff\u6362",
        visible: function() {
          return this.actionType === ACTION_MODE.REPLACE_WATCH_PATH;
        }
      }) ], MVCompsEdit.prototype, "replacePath", void 0);
      __decorate([ property({
        tooltip: "\u662f\u5426\u641c\u96c6\u7ed1\u5b9aVM\u7ec4\u4ef6\u7684\u8282\u70b9?",
        visible: function() {
          return this.actionType === ACTION_MODE.SEARCH_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "canCollectNodes", void 0);
      __decorate([ property({
        type: [ cc.Node ],
        readonly: true,
        tooltip: "\u6536\u96c6\u5230\u7ed1\u5b9a\u4e86VM\u7ec4\u4ef6\u76f8\u5173\u7684\u8282\u70b9\uff0c\u53ef\u4ee5\u81ea\u5df1\u8df3\u8f6c\u8fc7\u53bb",
        visible: function() {
          return this.canCollectNodes && this.actionType === ACTION_MODE.SEARCH_COMPONENT;
        }
      }) ], MVCompsEdit.prototype, "collectNodes", void 0);
      MVCompsEdit = __decorate([ ccclass, executeInEditMode, menu("ModelViewer/Edit-Comps (\u5feb\u901f\u7ec4\u4ef6\u64cd\u4f5c)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMCompsEdit.md") ], MVCompsEdit);
      return MVCompsEdit;
    }(cc.Component);
    exports.default = MVCompsEdit;
    cc._RF.pop();
  }, {} ],
  VMCustom: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c259bpYoepKVa0cCcEINDDF", "VMCustom");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var VMBase_1 = require("./VMBase");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, executeInEditMode = _a.executeInEditMode, menu = _a.menu, help = _a.help;
    var COMP_ARRAY_CHECK = [ [ "BhvFrameIndex", "index", false ], [ "BhvGroupToggle", "index", false ], [ "BhvRollNumber", "targetValue", false ], [ "cc.Label", "string", false ], [ "cc.RichText", "string", false ], [ "cc.cc.EditBox", "string", true ], [ "cc.Slider", "progress", true ], [ "cc.ProgressBar", "progress", false ], [ "cc.Toggle", "isChecked", true ] ];
    var VMCustom = function(_super) {
      __extends(VMCustom, _super);
      function VMCustom() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.controller = false;
        _this.watchPath = "";
        _this.componentName = "";
        _this.componentProperty = "";
        _this.refreshRate = .1;
        _this._timer = 0;
        _this._watchComponent = null;
        _this._canWatchComponent = false;
        _this._oldValue = null;
        return _this;
      }
      VMCustom.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
        this.checkEditorComponent();
        true;
        this._watchComponent = this.node.getComponent(this.componentName);
        this.checkComponentState();
      };
      VMCustom.prototype.onRestore = function() {
        this.checkEditorComponent();
      };
      VMCustom.prototype.start = function() {
        this.onValueInit();
      };
      VMCustom.prototype.checkEditorComponent = function() {
        var checkArray;
        var i;
        var params;
        var comp;
        false;
      };
      VMCustom.prototype.checkComponentState = function() {
        this._canWatchComponent = false;
        if (!this._watchComponent) {
          console.error("\u672a\u8bbe\u7f6e\u9700\u8981\u76d1\u542c\u7684\u7ec4\u4ef6");
          return;
        }
        if (!this.componentProperty) {
          console.error("\u672a\u8bbe\u7f6e\u9700\u8981\u76d1\u542c\u7684\u7ec4\u4ef6 \u7684\u5c5e\u6027");
          return;
        }
        if (this.componentProperty in this._watchComponent === false) {
          console.error("\u9700\u8981\u76d1\u542c\u7684\u7ec4\u4ef6\u7684\u5c5e\u6027\u4e0d\u5b58\u5728");
          return;
        }
        this._canWatchComponent = true;
      };
      VMCustom.prototype.getComponentValue = function() {
        return this._watchComponent[this.componentProperty];
      };
      VMCustom.prototype.setComponentValue = function(value) {
        "cc.Toggle" == this.componentName ? this.node.getComponent(cc.Toggle).isChecked = value : this._watchComponent[this.componentProperty] = value;
      };
      VMCustom.prototype.onValueInit = function() {
        false;
        this.setComponentValue(this.VM.getValue(this.watchPath));
      };
      VMCustom.prototype.onValueController = function(newValue, oldValue) {
        this.VM.setValue(this.watchPath, newValue);
      };
      VMCustom.prototype.onValueChanged = function(n, o, pathArr) {
        this.setComponentValue(n);
      };
      VMCustom.prototype.update = function(dt) {
        false;
        if (!this.controller) return;
        if (!this._canWatchComponent || false === this._watchComponent["enabled"]) return;
        this._timer += dt;
        if (this._timer < this.refreshRate) return;
        this._timer = 0;
        var oldValue = this._oldValue;
        var newValue = this.getComponentValue();
        if (this._oldValue === newValue) return;
        this._oldValue = this.getComponentValue();
        this.onValueController(newValue, oldValue);
      };
      __decorate([ property({
        tooltip: "\u6fc0\u6d3bcontroller,\u4ee5\u5f00\u542f\u53cc\u5411\u7ed1\u5b9a\uff0c\u5426\u5219\u53ea\u80fd\u63a5\u6536\u6d88\u606f"
      }) ], VMCustom.prototype, "controller", void 0);
      __decorate([ property({
        tooltip: "\u76d1\u89c6\u5bf9\u8c61\u8def\u5f84"
      }) ], VMCustom.prototype, "watchPath", void 0);
      __decorate([ property({
        tooltip: "\u7ed1\u5b9a\u7ec4\u4ef6\u7684\u540d\u5b57"
      }) ], VMCustom.prototype, "componentName", void 0);
      __decorate([ property({
        tooltip: "\u7ec4\u4ef6\u4e0a\u9700\u8981\u76d1\u542c\u7684\u5c5e\u6027"
      }) ], VMCustom.prototype, "componentProperty", void 0);
      __decorate([ property({
        tooltip: "\u5237\u65b0\u95f4\u9694\u9891\u7387(\u53ea\u5f71\u54cd\u810f\u68c0\u67e5\u7684\u9891\u7387)",
        step: .01,
        range: [ 0, 1 ],
        visible: function() {
          return true === this.controller;
        }
      }) ], VMCustom.prototype, "refreshRate", void 0);
      VMCustom = __decorate([ ccclass, executeInEditMode, menu("ModelViewer/VM-Custom (\u81ea\u5b9a\u4e49VM)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMCustom.md") ], VMCustom);
      return VMCustom;
    }(VMBase_1.default);
    exports.default = VMCustom;
    cc._RF.pop();
  }, {
    "./VMBase": "VMBase"
  } ],
  VMEvent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "83adbWaeApKSKueccGMegCc", "VMEvent");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var VMBase_1 = require("./VMBase");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, executeInEditMode = _a.executeInEditMode, menu = _a.menu, help = _a.help;
    var FILTER_MODE;
    (function(FILTER_MODE) {
      FILTER_MODE[FILTER_MODE["none"] = 0] = "none";
      FILTER_MODE[FILTER_MODE["=="] = 1] = "==";
      FILTER_MODE[FILTER_MODE["!="] = 2] = "!=";
      FILTER_MODE[FILTER_MODE[">"] = 3] = ">";
      FILTER_MODE[FILTER_MODE[">="] = 4] = ">=";
      FILTER_MODE[FILTER_MODE["<"] = 5] = "<";
      FILTER_MODE[FILTER_MODE["<="] = 6] = "<=";
    })(FILTER_MODE || (FILTER_MODE = {}));
    var VMEvent = function(_super) {
      __extends(VMEvent, _super);
      function VMEvent() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.templateMode = false;
        _this.watchPath = "";
        _this.triggerOnce = false;
        _this.watchPathArr = [];
        _this.filterMode = FILTER_MODE.none;
        _this.compareValue = "";
        _this.changeEvents = [];
        return _this;
      }
      VMEvent.prototype.onValueInit = function() {};
      VMEvent.prototype.onValueChanged = function(newVar, oldVar, pathArr) {
        var res = this.conditionCheck(newVar, this.compareValue);
        if (!res) return;
        Array.isArray(this.changeEvents) && this.changeEvents.forEach(function(v) {
          v.emit([ newVar, oldVar, pathArr ]);
        });
        true === this.triggerOnce && (this.enabled = false);
      };
      VMEvent.prototype.conditionCheck = function(a, b) {
        var cod = FILTER_MODE;
        switch (this.filterMode) {
         case cod.none:
          return true;

         case cod["=="]:
          if (a == b) return true;
          break;

         case cod["!="]:
          if (a != b) return true;
          break;

         case cod["<"]:
          if (a < b) return true;
          break;

         case cod[">"]:
          if (a > b) return true;
          break;

         case cod[">="]:
          if (a >= b) return true;
          break;

         case cod["<"]:
          if (a < b) return true;
          break;

         case cod["<="]:
          if (a <= b) return true;
        }
        return false;
      };
      __decorate([ property({
        tooltip: "\u4f7f\u7528\u6a21\u677f\u6a21\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u8def\u5f84\u76d1\u542c"
      }) ], VMEvent.prototype, "templateMode", void 0);
      __decorate([ property({
        tooltip: "\u76d1\u542c\u83b7\u53d6\u503c\u7684\u8def\u5f84",
        visible: function() {
          return false === this.templateMode;
        }
      }) ], VMEvent.prototype, "watchPath", void 0);
      __decorate([ property({
        tooltip: "\u89e6\u53d1\u4e00\u6b21\u540e\u4f1a\u81ea\u52a8\u5173\u95ed\u8be5\u4e8b\u4ef6"
      }) ], VMEvent.prototype, "triggerOnce", void 0);
      __decorate([ property({
        tooltip: "\u76d1\u542c\u83b7\u53d6\u503c\u7684\u591a\u6761\u8def\u5f84,\u8fd9\u4e9b\u503c\u7684\u6539\u53d8\u90fd\u4f1a\u901a\u8fc7\u8fd9\u4e2a\u51fd\u6570\u56de\u8c03,\u8bf7\u4f7f\u7528 pathArr \u533a\u5206\u83b7\u53d6\u7684\u503c ",
        type: [ String ],
        visible: function() {
          return true === this.templateMode;
        }
      }) ], VMEvent.prototype, "watchPathArr", void 0);
      __decorate([ property({
        tooltip: "\u8fc7\u6ee4\u6a21\u5f0f\uff0c\u4f1a\u6839\u636e\u6761\u4ef6\u8fc7\u6ee4\u6389\u65f6\u95f4\u7684\u89e6\u53d1",
        type: cc.Enum(FILTER_MODE)
      }) ], VMEvent.prototype, "filterMode", void 0);
      __decorate([ property({
        visible: function() {
          return this.filterMode !== FILTER_MODE.none;
        }
      }) ], VMEvent.prototype, "compareValue", void 0);
      __decorate([ property([ cc.Component.EventHandler ]) ], VMEvent.prototype, "changeEvents", void 0);
      VMEvent = __decorate([ ccclass, executeInEditMode, menu("ModelViewer/VM-EventCall(\u8c03\u7528\u51fd\u6570)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMEvent.md") ], VMEvent);
      return VMEvent;
    }(VMBase_1.default);
    exports.default = VMEvent;
    cc._RF.pop();
  }, {
    "./VMBase": "VMBase"
  } ],
  VMLabel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b9e66NtW2NCBpEeECVx/NUN", "VMLabel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var StringUtil_1 = require("../../utils/StringUtil");
    var StringFormat_1 = require("./StringFormat");
    var VMBase_1 = require("./VMBase");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu, executeInEditMode = _a.executeInEditMode, help = _a.help;
    var LABEL_TYPE = {
      CC_LABEL: "cc.Label",
      CC_RICH_TEXT: "cc.RichText",
      CC_EDIT_BOX: "cc.cc.EditBox"
    };
    var VMLabel = function(_super) {
      __extends(VMLabel, _super);
      function VMLabel() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.templateMode = false;
        _this.labelType = LABEL_TYPE.CC_LABEL;
        _this.watchPath = "";
        _this.watchPathArr = [];
        _this.templateValueArr = [];
        _this.templateFormatArr = [];
        _this.originText = null;
        return _this;
      }
      VMLabel.prototype.onRestore = function() {
        this.checkLabel();
      };
      VMLabel.prototype.onLoad = function() {
        _super.prototype.onLoad.call(this);
        this.checkLabel();
        true;
        if (this.templateMode) {
          this.originText = this.getLabelValue();
          this.parseTemplate();
        }
      };
      VMLabel.prototype.start = function() {
        false;
        this.onValueInit();
      };
      VMLabel.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
      };
      VMLabel.prototype.parseTemplate = function() {
        var regexAll = /\{(.+?)\}/g;
        var regex = /\{(.+?)\}/;
        var res = this.originText.match(regexAll);
        if (null == res) return;
        for (var i = 0; i < res.length; i++) {
          var e = res[i];
          var arr = e.match(regex);
          var matchName = arr[1];
          var matchInfo = matchName.split(":")[1] || "";
          this.templateFormatArr[i] = matchInfo;
        }
      };
      VMLabel.prototype.getReplaceText = function() {
        if (!this.originText) return "";
        var regexAll = /\{(.+?)\}/g;
        var regex = /\{(.+?)\}/;
        var res = this.originText.match(regexAll);
        if (null == res) return "";
        var str = this.originText;
        for (var i = 0; i < res.length; i++) {
          var e = res[i];
          var getValue = void 0;
          var arr = e.match(regex);
          var indexNum = parseInt(arr[1] || "0") || 0;
          var format = this.templateFormatArr[i];
          getValue = this.templateValueArr[indexNum];
          str = str.replace(e, this.getValueFromFormat(getValue, format));
        }
        return str;
      };
      VMLabel.prototype.getValueFromFormat = function(value, format) {
        return StringFormat_1.StringFormatFunction.deal(value, format);
      };
      VMLabel.prototype.onValueInit = function() {
        if (false === this.templateMode) "GameBaseView.gold" == this.watchPath ? this.VM.getValue(this.watchPath, 0) > 1e3 ? this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(this.VM.getValue(this.watchPath, 0), 2)) : this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(this.VM.getValue(this.watchPath, 0))) : this.setLabelValue(this.VM.getValue(this.watchPath)); else {
          var max = this.watchPathArr.length;
          for (var i = 0; i < max; i++) this.templateValueArr[i] = this.VM.getValue(this.watchPathArr[i], "?");
          this.setLabelValue(this.getReplaceText());
        }
      };
      VMLabel.prototype.onValueChanged = function(n, o, pathArr) {
        var _this = this;
        if (false === this.templateMode) if ("gold" == pathArr[1]) {
          var value_1 = Math.floor((n - o) / 100);
          var index_1 = 1;
          this.schedule(function() {
            index_1 >= 100 ? n > 1e3 ? _this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(n, 2)) : _this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(n)) : o + value_1 * index_1 > 1e3 ? _this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(o + value_1 * index_1, 2)) : _this.setLabelValue(StringUtil_1.StringUtil.numberToThousand(o + value_1 * index_1));
            index_1++;
          }, .005, 99);
        } else this.setLabelValue(n); else {
          var path_1 = pathArr.join(".");
          var index = this.watchPathArr.findIndex(function(v) {
            return v === path_1;
          });
          if (index >= 0) {
            this.templateValueArr[index] = n;
            this.setLabelValue(this.getReplaceText());
          }
        }
      };
      VMLabel.prototype.setLabelValue = function(value) {
        var component = this.getComponent(this.labelType);
        component.string = "undefined" !== typeof value ? value + "" : "\u521d\u59cb\u5316\u6570\u636e";
      };
      VMLabel.prototype.getLabelValue = function() {
        var component = this.getComponent(this.labelType);
        return component.string;
      };
      VMLabel.prototype.checkLabel = function() {
        var checkArray = [ "cc.Label", "cc.RichText", "cc.cc.EditBox" ];
        for (var i = 0; i < checkArray.length; i++) {
          var e = checkArray[i];
          var comp = this.node.getComponent(e);
          if (comp) {
            this.labelType = e;
            return true;
          }
        }
        cc.error("\u6ca1\u6709\u6302\u8f7d\u4efb\u4f55label\u7ec4\u4ef6");
        return false;
      };
      __decorate([ property({
        tooltip: "\u662f\u5426\u542f\u7528\u6a21\u677f\u4ee3\u7801,\u53ea\u80fd\u5728\u8fd0\u884c\u65f6\u4e4b\u524d\u8bbe\u7f6e,\n\u5c06\u4f1a\u52a8\u6001\u89e3\u6790\u6a21\u677f\u8bed\u6cd5 {0},\u5e76\u4e14\u81ea\u52a8\u8bbe\u7f6e\u76d1\u542c\u7684\u8def\u5f84"
      }) ], VMLabel.prototype, "templateMode", void 0);
      __decorate([ property({
        readonly: true
      }) ], VMLabel.prototype, "labelType", void 0);
      __decorate([ property({
        visible: function() {
          return false === this.templateMode;
        }
      }) ], VMLabel.prototype, "watchPath", void 0);
      __decorate([ property({
        type: [ String ],
        visible: function() {
          return true === this.templateMode;
        }
      }) ], VMLabel.prototype, "watchPathArr", void 0);
      VMLabel = __decorate([ ccclass, executeInEditMode, menu("ModelViewer/VM-cc.Label(\u6587\u672cVM)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMLabel.md") ], VMLabel);
      return VMLabel;
    }(VMBase_1.default);
    exports.default = VMLabel;
    cc._RF.pop();
  }, {
    "../../utils/StringUtil": "StringUtil",
    "./StringFormat": "StringFormat",
    "./VMBase": "VMBase"
  } ],
  VMModify: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "85b004Bq0xLvZmKZXpssWFA", "VMModify");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var VMBase_1 = require("./VMBase");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu, help = _a.help;
    var CLAMP_MODE;
    (function(CLAMP_MODE) {
      CLAMP_MODE[CLAMP_MODE["MIN"] = 0] = "MIN";
      CLAMP_MODE[CLAMP_MODE["MAX"] = 1] = "MAX";
      CLAMP_MODE[CLAMP_MODE["MIN_MAX"] = 2] = "MIN_MAX";
    })(CLAMP_MODE || (CLAMP_MODE = {}));
    var VMModify = function(_super) {
      __extends(VMModify, _super);
      function VMModify() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.watchPath = "";
        _this.valueClamp = false;
        _this.valueClampMode = CLAMP_MODE.MIN_MAX;
        _this.valueMin = 0;
        _this.valueMax = 1;
        return _this;
      }
      VMModify.prototype.clampValue = function(res) {
        var min = this.valueMin;
        var max = this.valueMax;
        if (false == this.valueClamp) return res;
        switch (this.valueClampMode) {
         case CLAMP_MODE.MIN_MAX:
          res > max && (res = max);
          res < min && (res = min);
          break;

         case CLAMP_MODE.MIN:
          res < min && (res = min);
          break;

         case CLAMP_MODE.MAX:
          res > max && (res = max);
        }
        return res;
      };
      VMModify.prototype.vAddInt = function(e, data) {
        this.vAdd(e, data, true);
      };
      VMModify.prototype.vSubInt = function(e, data) {
        this.vSub(e, data, true);
      };
      VMModify.prototype.vMulInt = function(e, data) {
        this.vMul(e, data, true);
      };
      VMModify.prototype.vDivInt = function(e, data) {
        this.vDiv(e, data, true);
      };
      VMModify.prototype.vAdd = function(e, data, int) {
        void 0 === int && (int = false);
        var a = parseFloat(data);
        var res = this.VM.getValue(this.watchPath, 0) + a;
        int && (res = Math.round(res));
        this.VM.setValue(this.watchPath, this.clampValue(res));
      };
      VMModify.prototype.vSub = function(e, data, int) {
        void 0 === int && (int = false);
        var a = parseFloat(data);
        var res = this.VM.getValue(this.watchPath, 0) - a;
        int && (res = Math.round(res));
        this.VM.setValue(this.watchPath, this.clampValue(res));
      };
      VMModify.prototype.vMul = function(e, data, int) {
        void 0 === int && (int = false);
        var a = parseFloat(data);
        var res = this.VM.getValue(this.watchPath, 0) * a;
        int && (res = Math.round(res));
        this.VM.setValue(this.watchPath, this.clampValue(res));
      };
      VMModify.prototype.vDiv = function(e, data, int) {
        void 0 === int && (int = false);
        var a = parseFloat(data);
        var res = this.VM.getValue(this.watchPath, 0) / a;
        int && (res = Math.round(res));
        this.VM.setValue(this.watchPath, this.clampValue(res));
      };
      VMModify.prototype.vString = function(e, data) {
        var a = data;
        this.VM.setValue(this.watchPath, a);
      };
      VMModify.prototype.vNumberInt = function(e, data) {
        this.vNumber(e, data, true);
      };
      VMModify.prototype.vNumber = function(e, data, int) {
        void 0 === int && (int = false);
        var a = parseFloat(data);
        int && (a = Math.round(a));
        this.VM.setValue(this.watchPath, this.clampValue(a));
      };
      __decorate([ property({
        tooltip: "\u76d1\u89c6\u5bf9\u8c61\u8def\u5f84"
      }) ], VMModify.prototype, "watchPath", void 0);
      __decorate([ property({
        tooltip: "\u662f\u4e0d\u542f\u7528\u53d6\u503c\u8303\u56f4\u9650\u5236"
      }) ], VMModify.prototype, "valueClamp", void 0);
      __decorate([ property({
        type: cc.Enum(CLAMP_MODE),
        visible: function() {
          return true === this.valueClamp;
        }
      }) ], VMModify.prototype, "valueClampMode", void 0);
      __decorate([ property({
        visible: function() {
          return true === this.valueClamp && this.valueClampMode !== CLAMP_MODE.MAX;
        }
      }) ], VMModify.prototype, "valueMin", void 0);
      __decorate([ property({
        visible: function() {
          return true === this.valueClamp && this.valueClampMode !== CLAMP_MODE.MIN;
        }
      }) ], VMModify.prototype, "valueMax", void 0);
      VMModify = __decorate([ ccclass, menu("ModelViewer/VM-Modify(\u4fee\u6539Model)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMModify.md") ], VMModify);
      return VMModify;
    }(VMBase_1.default);
    exports.default = VMModify;
    cc._RF.pop();
  }, {
    "./VMBase": "VMBase"
  } ],
  VMParent: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c7b3et08OpOzZsH5zo6GfDr", "VMParent");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var ViewModel_1 = require("./ViewModel");
    var _a = cc._decorator, ccclass = _a.ccclass, help = _a.help, executionOrder = _a.executionOrder;
    var VMParent = function(_super) {
      __extends(VMParent, _super);
      function VMParent() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.tag = "_temp";
        _this.data = {};
        _this.VM = ViewModel_1.VM;
        return _this;
      }
      VMParent.prototype.onLoad = function() {
        if (null == this.data) return;
        console.info(this.node.uuid);
        this.tag = "_temp<" + this.node.uuid.replace(".", "") + ">";
        ViewModel_1.VM.add(this.data, this.tag);
        var comps = this.getVMComponents();
        for (var i = 0; i < comps.length; i++) {
          var comp = comps[i];
          this.replaceVMPath(comp, this.tag);
        }
        this.onBind();
      };
      VMParent.prototype.onBind = function() {};
      VMParent.prototype.onUnBind = function() {};
      VMParent.prototype.replaceVMPath = function(comp, tag) {
        var path = comp["watchPath"];
        if (true == comp["templateMode"]) {
          var pathArr = comp["watchPathArr"];
          if (pathArr) for (var i = 0; i < pathArr.length; i++) {
            var path_1 = pathArr[i];
            if ("*" === pathArr[i].split(".")[0]) pathArr[i] = path_1.replace("*", tag); else if ("#" === pathArr[i].split(".")[0]) {
              pathArr[i] = path_1.replace("#", tag);
              comp.onEnable();
            }
          }
        } else if ("*" === path.split(".")[0]) comp["watchPath"] = path.replace("*", tag); else if ("#" === path.split(".")[0]) {
          comp["watchPath"] = path.replace("#", tag);
          comp.onEnable();
        }
      };
      VMParent.prototype.getVMComponents = function() {
        var _this = this;
        var comps = this.node.getComponentsInChildren("VMBase");
        var parents = this.node.getComponentsInChildren("VMParent").filter(function(v) {
          return v.uuid !== _this.uuid;
        });
        var filters = [];
        parents.forEach(function(node) {
          filters = filters.concat(node.getComponentsInChildren("VMBase"));
        });
        comps = comps.filter(function(v) {
          return filters.indexOf(v) < 0;
        });
        return comps;
      };
      VMParent.prototype.onDestroy = function() {
        this.onUnBind();
        ViewModel_1.VM.remove(this.tag);
        this.data = null;
      };
      VMParent = __decorate([ ccclass, executionOrder(-1), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMParent.md") ], VMParent);
      return VMParent;
    }(cc.Component);
    exports.default = VMParent;
    cc._RF.pop();
  }, {
    "./ViewModel": "ViewModel"
  } ],
  VMProgress: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7a751Is4ORHF61G7TgSIq7j", "VMProgress");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var StringFormat_1 = require("./StringFormat");
    var VMCustom_1 = require("./VMCustom");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, menu = _a.menu, help = _a.help;
    var VMProgress = function(_super) {
      __extends(VMProgress, _super);
      function VMProgress() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.watchPath = "";
        _this.watchPathArr = [ "[min]", "[max]" ];
        _this.templateMode = true;
        _this.stringFormat = "";
        return _this;
      }
      VMProgress.prototype.onLoad = function() {
        (this.watchPathArr.length < 2 || "[min]" == this.watchPathArr[0] || "[max]" == this.watchPathArr[1]) && console.error("VMProgress must have two values!");
        _super.prototype.onLoad.call(this);
      };
      VMProgress.prototype.start = function() {
        true;
        this.onValueInit();
      };
      VMProgress.prototype.onValueInit = function() {
        var max = this.watchPathArr.length;
        for (var i = 0; i < max; i++) this.templateValueArr[i] = this.VM.getValue(this.watchPathArr[i]);
        var value;
        value = 0 == this.templateValueArr[1] ? 1 : this.templateValueArr[0] / this.templateValueArr[1];
        this.setComponentValue(value);
      };
      VMProgress.prototype.setComponentValue = function(value) {
        if ("" !== this.stringFormat) {
          var res = StringFormat_1.StringFormatFunction.deal(value, this.stringFormat);
          _super.prototype.setComponentValue.call(this, res);
        } else _super.prototype.setComponentValue.call(this, value);
      };
      VMProgress.prototype.onValueController = function(n, o) {
        var value = Math.round(n * this.templateValueArr[1]);
        Number.isNaN(value) && (value = 0);
        this.VM.setValue(this.watchPathArr[0], value);
      };
      VMProgress.prototype.onValueChanged = function(n, o, pathArr) {
        if (false === this.templateMode) return;
        var path = pathArr.join(".");
        var index = this.watchPathArr.findIndex(function(v) {
          return v === path;
        });
        index >= 0 && (this.templateValueArr[index] = n);
        var value = 0;
        value = 0 == this.templateValueArr[1] ? 1 : this.templateValueArr[0] / this.templateValueArr[1];
        value > 1 && (value = 1);
        (value < 0 || Number.isNaN(value)) && (value = 0);
        this.setComponentValue(value);
      };
      __decorate([ property({
        visible: false,
        override: true
      }) ], VMProgress.prototype, "watchPath", void 0);
      __decorate([ property({
        type: [ String ],
        tooltip: "\u7b2c\u4e00\u4e2a\u503c\u662fmin \u503c\uff0c\u7b2c\u4e8c\u4e2a\u503c \u662f max \u503c\uff0c\u4f1a\u8ba1\u7b97\u51fa\u4e24\u8005\u7684\u6bd4\u4f8b"
      }) ], VMProgress.prototype, "watchPathArr", void 0);
      __decorate([ property({
        visible: function() {
          return "string" === this.componentProperty;
        },
        tooltip: "\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\uff0c\u548c VMLabel \u7684\u5b57\u6bb5\u4e00\u6837\uff0c\u9700\u8981\u586b\u5165\u5bf9\u5e94\u7684\u683c\u5f0f\u5316\u5b57\u7b26\u4e32"
      }) ], VMProgress.prototype, "stringFormat", void 0);
      VMProgress = __decorate([ ccclass, menu("ModelViewer/VM-Progress (VM-\u8fdb\u5ea6\u6761)"), help("https://github.com/wsssheep/cocos_creator_mvvm_tools/blob/master/docs/VMProgress.md") ], VMProgress);
      return VMProgress;
    }(VMCustom_1.default);
    exports.default = VMProgress;
    cc._RF.pop();
  }, {
    "./StringFormat": "StringFormat",
    "./VMCustom": "VMCustom"
  } ],
  Vec3Util: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6edb4sEP81M9av8U7vyqZov", "Vec3Util");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Vec3Util = void 0;
    var MathUtil_1 = require("./MathUtil");
    var Vec3Util = function() {
      function Vec3Util() {}
      Object.defineProperty(Vec3Util, "x", {
        get: function() {
          return new cc.Vec3(1, 0, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "y", {
        get: function() {
          return new cc.Vec3(0, 1, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "z", {
        get: function() {
          return new cc.Vec3(0, 0, 1);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "left", {
        get: function() {
          return new cc.Vec3(-1, 0, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "right", {
        get: function() {
          return new cc.Vec3(1, 0, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "up", {
        get: function() {
          return new cc.Vec3(0, 1, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "down", {
        get: function() {
          return new cc.Vec3(0, -1, 0);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "forward", {
        get: function() {
          return new cc.Vec3(0, 0, 1);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "back", {
        get: function() {
          return new cc.Vec3(0, 0, -1);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "one", {
        get: function() {
          return new cc.Vec3(1, 1, 1);
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Vec3Util, "zero", {
        get: function() {
          return new cc.Vec3(0, 0, 0);
        },
        enumerable: false,
        configurable: true
      });
      Vec3Util.progress = function(start, end, t) {
        var current = new cc.Vec3();
        current.x = MathUtil_1.MathUtil.progress(start.x, end.x, t);
        current.y = MathUtil_1.MathUtil.progress(start.y, end.y, t);
        current.z = MathUtil_1.MathUtil.progress(start.z, end.z, t);
        return current;
      };
      Vec3Util.add = function(pos1, pos2) {
        var outPos = new cc.Vec3();
        cc.Vec3.add(outPos, pos1, pos2);
        return outPos;
      };
      Vec3Util.sub = function(pos1, pos2) {
        var outPos = new cc.Vec3();
        cc.Vec3.subtract(outPos, pos1, pos2);
        return outPos;
      };
      Vec3Util.mul = function(pos, scalar) {
        var outPos = new cc.Vec3();
        cc.Vec3.multiplyScalar(outPos, pos, scalar);
        return outPos;
      };
      Vec3Util.div = function(pos, scalar) {
        var outPos = new cc.Vec3();
        outPos.x = pos.x / scalar;
        outPos.y = pos.y / scalar;
        outPos.z = pos.z / scalar;
        return outPos;
      };
      Vec3Util.equals = function(pos1, pos2) {
        if (pos1.x == pos2.x && pos1.y == pos2.y && pos1.z == pos2.z) return true;
        return false;
      };
      Vec3Util.magnitude = function(pos) {
        return pos.mag();
      };
      Vec3Util.normalize = function(pos) {
        var outPos = new cc.Vec3(pos.x, pos.y, pos.z);
        return outPos.normalize();
      };
      Vec3Util.direction = function(pos1, pos2) {
        var outPos = new cc.Vec3();
        cc.Vec3.subtract(outPos, pos2, pos1);
        return outPos.normalize();
      };
      Vec3Util.distance = function(pos1, pos2) {
        return cc.Vec3.distance(pos1, pos2);
      };
      Vec3Util.lerp = function(posStart, posEnd, t) {
        return this.bezierOne(t, posStart, posEnd);
      };
      Vec3Util.slerp = function(from, to, t) {
        if (t <= 0) return from;
        if (t >= 1) return to;
        var dir = this.rotateTo(from, to, cc.Vec3.angle(from, to) / Math.PI * 180 * t);
        var lenght = to.mag() * t + from.mag() * (1 - t);
        return dir.normalize().multiplyScalar(lenght);
      };
      Vec3Util.rotateTo = function(from, to, angle) {
        if (0 == cc.Vec3.angle(from, to)) return to;
        var axis = new cc.Vec3();
        cc.Vec3.cross(axis, from, to);
        axis.normalize();
        var radian = angle * Math.PI / 180;
        var rotateMatrix = new cc.Mat4();
        rotateMatrix.rotate(radian, axis);
        return new cc.Vec3(from.x * rotateMatrix.m[0][0] + from.y * rotateMatrix.m[0][4] + from.z * rotateMatrix.m[0][8], from.x * rotateMatrix.m[0][1] + from.y * rotateMatrix.m[0][5] + from.z * rotateMatrix.m[0][9], from.x * rotateMatrix.m[0][2] + from.y * rotateMatrix.m[0][6] + from.z * rotateMatrix.m[1][0]);
      };
      Vec3Util.bezierOne = function(t, posStart, posEnd) {
        t > 1 ? t = 1 : t < 0 && (t = 0);
        var pStart = posStart.clone();
        var pEnd = posEnd.clone();
        return pStart.multiplyScalar(1 - t).add(pEnd.multiplyScalar(t));
      };
      Vec3Util.bezierTwo = function(t, posStart, posCon, posEnd) {
        t > 1 ? t = 1 : t < 0 && (t = 0);
        var n = 1 - t;
        var tt = t * t;
        var pStart = posStart.clone();
        var pos = posStart.clone();
        var pCon = posCon.clone();
        var pEnd = posEnd.clone();
        pos.add(pStart.multiplyScalar(n * n));
        pos.add(pCon.multiplyScalar(2 * n * t));
        pos.add(pEnd.multiplyScalar(tt));
        return pos;
      };
      Vec3Util.bezierThree = function(t, posStart, posCon1, posCon2, posEnd) {
        t > 1 ? t = 1 : t < 0 && (t = 0);
        var n = 1 - t;
        var nn = n * n;
        var nnn = nn * n;
        var tt = t * t;
        var ttt = tt * t;
        var pStart = posStart.clone();
        var pos = posStart.clone();
        var pCon1 = posCon1.clone();
        var pCon2 = posCon2.clone();
        var pEnd = posEnd.clone();
        pos.add(pStart.multiplyScalar(nnn));
        pos.add(pCon1.multiplyScalar(3 * nn * t));
        pos.add(pCon2.multiplyScalar(3 * n * tt));
        pos.add(pEnd.multiplyScalar(ttt));
        return pos;
      };
      Vec3Util.dot = function(dir1, dir2) {
        var tempDir1 = dir1;
        var tempDir2 = dir2;
        return tempDir1.x * tempDir2.x + tempDir1.y * tempDir2.y + tempDir1.z * tempDir2.z;
      };
      Vec3Util.cross = function(dir1, dir2) {
        var i = new cc.Vec3(1, 0, 0);
        var j = new cc.Vec3(0, 1, 0);
        var k = new cc.Vec3(0, 0, 1);
        var tempDir1 = new cc.Vec3(dir1.x, dir1.y, dir1.z);
        var tempDir2 = new cc.Vec3(dir2.x, dir2.y, dir2.z);
        var iv = i.multiplyScalar(tempDir1.y * tempDir2.z - tempDir2.y * tempDir1.z);
        var jv = j.multiplyScalar(tempDir2.x * tempDir1.z - tempDir1.x * tempDir2.z);
        var kv = k.multiplyScalar(tempDir1.x * tempDir2.y - tempDir2.x * tempDir1.y);
        return iv.add(jv).add(kv);
      };
      Vec3Util.angle = function(dir1, dir2) {
        var dotValue = this.dot(dir1.clone().normalize(), dir2.clone().normalize());
        return Math.acos(dotValue) / Math.PI * 180 * Math.sign(dotValue);
      };
      Vec3Util.dirAngle = function(a, b) {
        var c = Vec3Util.cross(a, b);
        var angle = Vec3Util.angle(a, b);
        var sign = Math.sign(Vec3Util.dot(c.normalize(), Vec3Util.cross(b.normalize(), a.normalize())));
        return angle * sign;
      };
      return Vec3Util;
    }();
    exports.Vec3Util = Vec3Util;
    cc._RF.pop();
  }, {
    "./MathUtil": "MathUtil"
  } ],
  ViewModel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "769e1p1gxhHB7JvgfzesJdf", "ViewModel");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.VM = void 0;
    var JsonOb_1 = require("./JsonOb");
    var VM_EMIT_HEAD = "VC:";
    var DEBUG_SHOW_PATH = false;
    function setValueFromPath(obj, path, value, tag) {
      void 0 === tag && (tag = "");
      var props = path.split(".");
      for (var i = 0; i < props.length; i++) {
        var propName = props[i];
        if (propName in obj === false) {
          console.error("[" + propName + "] not find in " + tag + "." + path);
          break;
        }
        i == props.length - 1 ? obj[propName] = value : obj = obj[propName];
      }
    }
    function getValueFromPath(obj, path, def, tag) {
      void 0 === tag && (tag = "");
      var props = path.split(".");
      for (var i = 0; i < props.length; i++) {
        var propName = props[i];
        if (propName in obj === false) {
          console.error("[" + propName + "] not find in " + tag + "." + path);
          return def;
        }
        obj = obj[propName];
      }
      null !== obj && "undefined" !== typeof obj || (obj = def);
      return obj;
    }
    var ViewModel = function() {
      function ViewModel(data, tag) {
        this._tag = null;
        this.active = true;
        this.emitToRootPath = false;
        new JsonOb_1.JsonOb(data, this._callback.bind(this));
        this.$data = data;
        this._tag = tag;
      }
      ViewModel.prototype._callback = function(n, o, path) {
        if (true == this.active) {
          var name = VM_EMIT_HEAD + this._tag + "." + path.join(".");
          DEBUG_SHOW_PATH && cc.log(">>", n, o, path);
          cc.director.emit(name, n, o, [ this._tag ].concat(path));
          this.emitToRootPath && cc.director.emit(VM_EMIT_HEAD + this._tag, n, o, path);
          if (path.length >= 2) for (var i = 0; i < path.length - 1; i++) var e = path[i];
        }
      };
      ViewModel.prototype.setValue = function(path, value) {
        setValueFromPath(this.$data, path, value, this._tag);
      };
      ViewModel.prototype.getValue = function(path, def) {
        return getValueFromPath(this.$data, path, def, this._tag);
      };
      return ViewModel;
    }();
    var VMManager = function() {
      function VMManager() {
        this._mvs = new Map();
        this.setObjValue = setValueFromPath;
        this.getObjValue = getValueFromPath;
      }
      VMManager.prototype.add = function(data, tag, activeRootObject) {
        void 0 === tag && (tag = "global");
        void 0 === activeRootObject && (activeRootObject = false);
        var vm = new ViewModel(data, tag);
        var has = this._mvs.get(tag);
        if (tag.includes(".")) {
          console.error("cant write . in tag:", tag);
          return;
        }
        if (has) {
          console.error("already set VM tag:" + tag);
          return;
        }
        vm.emitToRootPath = activeRootObject;
        this._mvs.set(tag, vm);
      };
      VMManager.prototype.remove = function(tag) {
        this._mvs.delete(tag);
      };
      VMManager.prototype.get = function(tag) {
        var res = this._mvs.get(tag);
        return res;
      };
      VMManager.prototype.addValue = function(path, value) {
        path = path.trim();
        var rs = path.split(".");
        rs.length < 2 && console.error("Cant find path:" + path);
        var vm = this.get(rs[0]);
        if (!vm) {
          console.error("Cant Set VM:" + rs[0]);
          return;
        }
        var resPath = rs.slice(1).join(".");
        vm.setValue(resPath, vm.getValue(resPath) + value);
      };
      VMManager.prototype.getValue = function(path, def) {
        path = path.trim();
        var rs = path.split(".");
        if (rs.length < 2) {
          console.error("Get Value Cant find path:" + path);
          return;
        }
        var vm = this.get(rs[0]);
        if (!vm) {
          if ("#" == rs[0]) return;
          console.error("Cant Get VM:" + rs[0]);
          return;
        }
        return vm.getValue(rs.slice(1).join("."), def);
      };
      VMManager.prototype.setValue = function(path, value) {
        path = path.trim();
        var rs = path.split(".");
        if (rs.length < 2) {
          console.error("Set Value Cant find path:" + path);
          return;
        }
        var vm = this.get(rs[0]);
        if (!vm) {
          if ("#" == rs[0]) return;
          console.error("Cant Set VM:" + rs[0]);
          return;
        }
        vm.setValue(rs.slice(1).join("."), value);
      };
      VMManager.prototype.bindPath = function(path, callback, target, useCapture) {
        path = path.trim();
        if ("" == path) {
          console.error(target.node.name, "\u8282\u70b9\u7ed1\u5b9a\u7684\u8def\u5f84\u4e3a\u7a7a");
          return;
        }
        if ("*" === path.split(".")[0]) {
          console.error(path, "\u8def\u5f84\u4e0d\u5408\u6cd5,\u53ef\u80fd\u9519\u8bef\u8986\u76d6\u4e86 VMParent \u7684onLoad \u65b9\u6cd5, \u6216\u8005\u7236\u8282\u70b9\u5e76\u672a\u6302\u8f7d VMParent \u76f8\u5173\u7684\u7ec4\u4ef6\u811a\u672c");
          return;
        }
        cc.director.on(VM_EMIT_HEAD + path, callback, target, useCapture);
      };
      VMManager.prototype.unbindPath = function(path, callback, target) {
        path = path.trim();
        if ("*" === path.split(".")[0]) {
          console.error(path, "\u8def\u5f84\u4e0d\u5408\u6cd5,\u53ef\u80fd\u9519\u8bef\u8986\u76d6\u4e86 VMParent \u7684onLoad \u65b9\u6cd5, \u6216\u8005\u7236\u8282\u70b9\u5e76\u672a\u6302\u8f7d VMParent \u76f8\u5173\u7684\u7ec4\u4ef6\u811a\u672c");
          return;
        }
        cc.director.off(VM_EMIT_HEAD + path, callback, target);
      };
      VMManager.prototype.inactive = function() {
        this._mvs.forEach(function(mv) {
          mv.active = false;
        });
      };
      VMManager.prototype.active = function() {
        this._mvs.forEach(function(mv) {
          mv.active = false;
        });
      };
      return VMManager;
    }();
    exports.VM = new VMManager();
    cc._RF.pop();
  }, {
    "./JsonOb": "JsonOb"
  } ],
  ViewUtil: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d8bbaxG6iJG7qbqquEglYdU", "ViewUtil");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.ViewUtil = void 0;
    var ResLoader_1 = require("../common/loader/ResLoader");
    var ViewUtil = function() {
      function ViewUtil() {}
      ViewUtil.nodeTreeInfoLite = function(parent, obj) {
        var map = obj || new Map();
        var items = parent.children;
        for (var i = 0; i < items.length; i++) {
          var _node = items[i];
          _node.name.indexOf(" ") < 0 && map.set(_node.name, _node);
          ViewUtil.nodeTreeInfoLite(_node, map);
        }
        return map;
      };
      ViewUtil.findNodes = function(reg, parent, _nodes) {
        var nodes = _nodes || [];
        var items = parent.children;
        for (var i = 0; i < items.length; i++) {
          var _name = items[i].name;
          reg.test(_name) && nodes.push(items[i]);
          ViewUtil.findNodes(reg, items[i], nodes);
        }
        return nodes;
      };
      ViewUtil.findNode = function(reg, parent) {
        var items = parent.children;
        for (var i = 0; i < items.length; i++) {
          var _name = items[i].name;
          if (reg.test(_name)) return items[i];
          var result = ViewUtil.findNode(reg, items[i]);
          if (null != result) return result;
        }
        return null;
      };
      ViewUtil.findNodeforname = function(name, parent) {
        var items = parent.children;
        for (var i = 0; i < items.length; i++) {
          var _name = items[i].name;
          if (name == _name) return items[i];
          var result = ViewUtil.findNodeforname(name, items[i]);
          if (null != result) return result;
        }
        return null;
      };
      ViewUtil.calculateASpaceToBSpacePos = function(a, b, aPos) {
        var world = a.convertToWorldSpaceAR(aPos);
        var space = b.convertToNodeSpaceAR(world);
        return space;
      };
      ViewUtil.calculateScreenPosToSpacePos = function(event, space) {
        var uil = event.getLocation();
        var worldPos = cc.v3(uil.x, uil.y);
        var mapPos = space.convertToNodeSpaceAR(worldPos);
        return mapPos;
      };
      ViewUtil.calculateScreenPosToWorldPos = function(event) {
        var uil = event.getLocation();
        var worldPos = cc.v3(uil.x, uil.y);
        var Rr = cc.view.getDesignResolutionSize();
        var baseOffset = new cc.Vec3((Rr.width - cc.view.getDesignResolutionSize().width) * cc.view.getDesignResolutionSize().height / Rr.width, (Rr.height - cc.view.getDesignResolutionSize().height) * cc.view.getDesignResolutionSize().width / Rr.height, 0);
        var offset = worldPos.subtract(baseOffset);
        return offset;
      };
      ViewUtil.toXY = function(node1, node2) {
        var wpos = node1.convertToWorldSpaceAR(cc.v2(0, 0));
        var pos = node2.convertToNodeSpaceAR(wpos);
        return pos;
      };
      ViewUtil.isChinese = function(str) {
        var filter = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
        return filter.test(str);
      };
      ViewUtil.uniformScale = function(targetWidth, targetHeight, defaultWidth, defaultHeight) {
        var widthRatio = defaultWidth / targetWidth;
        var heightRatio = defaultHeight / targetHeight;
        var ratio;
        ratio = widthRatio < heightRatio ? widthRatio : heightRatio;
        var size = new cc.Size(Math.floor(targetWidth * ratio), Math.floor(targetHeight * ratio));
        return size;
      };
      ViewUtil.createPrefabNode = function(bundle, name) {
        var _n = bundle;
        null == name && (_n = "resources");
        var p = ResLoader_1.resLoader.get(name, cc.Prefab, _n);
        var n = cc.instantiate(p);
        return n;
      };
      ViewUtil.addNodeAnimation = function(name, node, onlyOne, isDefaultClip) {
        void 0 === onlyOne && (onlyOne = true);
        void 0 === isDefaultClip && (isDefaultClip = false);
        if (!node || !node.isValid) return;
        var anim = node.getComponent(cc.Animation);
        null == anim && (anim = node.addComponent(cc.Animation));
        var clip = ResLoader_1.resLoader.get(name, cc.AnimationClip);
        if (!clip) return;
        if (onlyOne && anim.getAnimationState(clip.name) && anim.getAnimationState(clip.name).isPlaying) return;
        if (isDefaultClip) {
          anim.defaultClip = clip;
          anim.play();
          return;
        }
        anim.once(cc.Animation.EventType.FINISHED, function() {
          anim.defaultClip && anim.play();
        }, this);
        if (anim.getAnimationState(clip.name)) {
          anim.play(clip.name);
          return;
        }
      };
      return ViewUtil;
    }();
    exports.ViewUtil = ViewUtil;
    cc._RF.pop();
  }, {
    "../common/loader/ResLoader": "ResLoader"
  } ],
  WebSock: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "d47a7TgBvtNborCNTNc8AjW", "WebSock");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.WebSock = void 0;
    var Logger_1 = require("../common/log/Logger");
    var WebSock = function() {
      function WebSock() {
        this._ws = null;
        this.onConnected = null;
        this.onMessage = null;
        this.onError = null;
        this.onClosed = null;
      }
      WebSock.prototype.connect = function(options) {
        var _this = this;
        if (this._ws && this._ws.readyState === WebSocket.CONNECTING) {
          Logger_1.Logger.logNet("websocket connecting, wait for a moment...");
          return false;
        }
        var url = null;
        if (options.url) url = options.url; else {
          var ip = options.ip;
          var port = options.port;
          var protocol = options.protocol;
          url = protocol + "://" + ip + ":" + port;
        }
        this._ws = new WebSocket(url);
        this._ws.binaryType = options.binaryType ? options.binaryType : "arraybuffer";
        this._ws.onmessage = function(event) {
          var onMessage = _this.onMessage;
          onMessage(event.data);
        };
        this._ws.onopen = this.onConnected;
        this._ws.onerror = this.onError;
        this._ws.onclose = this.onClosed;
        return true;
      };
      WebSock.prototype.send = function(buffer) {
        if (this._ws && this._ws.readyState == WebSocket.OPEN) {
          this._ws.send(buffer);
          return 1;
        }
        return -1;
      };
      WebSock.prototype.close = function(code, reason) {
        this._ws && this._ws.close(code, reason);
      };
      return WebSock;
    }();
    exports.WebSock = WebSock;
    cc._RF.pop();
  }, {
    "../common/log/Logger": "Logger"
  } ],
  WechatPlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "50381LJd65EKal+GfYBTQbo", "WechatPlatform");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.WeChatPlatform = void 0;
    var ResLoader_1 = require("../common/loader/ResLoader");
    var Logger_1 = require("../common/log/Logger");
    var PlatformManager_1 = require("./PlatformManager");
    var WeChatPlatform = function() {
      function WeChatPlatform() {
        var _this = this;
        this._isRecording = false;
        this._isRecordFinished = false;
        this._recorder = null;
        this._recordTime = 0;
        this._MinRecordTime = 5e3;
        this._MaxRecordTime = 12e4;
        this.hideDate = null;
        this.shareCallBack = null;
        ResLoader_1.resLoader.loadDir("config", function() {
          var config = ResLoader_1.resLoader.get("config/config").json;
          _this._rewardedADId = config.AdvertisingID.rewardedVideoADIdForWX;
          _this._bannerADId = config.AdvertisingID.bannerVideoADIdForWX;
          _this._interstitialADId = config.AdvertisingID.interstitialVideoADIdForWX;
          _this._interstitialAdChances = config.InterstitialAdChances.value;
          _this._title = config.Share.Title;
          _this._desc = config.Share.Desc;
          _this._imageUrl = config.Share.ImageUrl;
        });
      }
      WeChatPlatform.prototype.init = function() {
        var _this = this;
        var self = this;
        wx.getSystemInfo({
          success: function(res) {
            self._systemInfo = res;
          },
          fail: function(res) {}
        });
        wx.onError(function(err) {});
        wx.onShow(function(res) {
          _this.checkShareResult();
        });
        this.createRewardedAd();
        this.createInterstitialAd();
      };
      WeChatPlatform.prototype.exitGame = function() {
        qg.exitApplication();
      };
      WeChatPlatform.prototype.checkShareResult = function() {
        if (!this.hideDate) return;
        var showDate = new Date();
        var useDate = showDate.getTime() - this.hideDate.getTime();
        this.shareCallBack && (useDate < 5e3 ? this.shareCallBack(false) : this.shareCallBack(true));
        this.shareCallBack = null;
        this.hideDate = null;
      };
      WeChatPlatform.prototype.request = function(url, data, method, callback) {
        var requestCall = wx.request;
        requestCall ? requestCall({
          url: url,
          method: method,
          data: data,
          success: function(res) {
            200 == res.statusCode ? 0 == res.data.code ? callback && callback(true, res.data) : callback && callback(false, res.data.code) : callback && callback(false, res.statusCode);
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        }) : callback && callback(false, "requestCall\u4e3a\u7a7a");
      };
      WeChatPlatform.prototype.login = function(callback) {
        var _lauchInfo = wx.getLaunchOptionsSync();
        var shareId = 0;
        var self = this;
        wx.login({
          success: function(res) {
            res.code ? callback && callback(true, res) : callback && callback(false, res.errMsg);
          },
          fail: function(res) {
            callback && callback(false, res.errMsg);
          }
        });
      };
      WeChatPlatform.prototype.getUserInfo = function(callback) {
        wx.getSetting({
          withSubscriptions: false,
          success: function(res) {
            Logger_1.Logger.logInterface("getSetting\u8bf7\u6c42\u6210\u529f \uff1a " + JSON.stringify(res));
            if (res.authSetting["scope.userInfo"]) wx.getUserInfo({
              success: function(res) {
                Logger_1.Logger.logInterface("getUserInfo\u8bf7\u6c42\u6210\u529f \uff1a " + JSON.stringify(res));
                callback && callback(true, res);
              },
              fail: function(res) {
                Logger_1.Logger.logInterface("getUserInfo\u8bf7\u6c42\u5931\u8d25 \uff1a " + JSON.stringify(res));
                callback && callback(false, res.errMsg);
              }
            }); else {
              var info = wx.getSystemInfoSync();
              var width = info.windowWidth;
              var height = info.windowHeight;
              var button_1 = wx.createUserInfoButton({
                type: "text",
                text: "\u70b9\u6b64\u6388\u6743\u6635\u79f0\u5934\u50cf",
                style: {
                  left: (width - 300) / 2,
                  top: .4 * height,
                  width: 300,
                  height: 60,
                  lineHeight: 40,
                  backgroundColor: "#ff6699",
                  color: "#ffffff",
                  textAlign: "center",
                  fontSize: 20,
                  borderRadius: 20
                }
              });
              button_1.onTap(function(res) {
                if (res) {
                  callback && callback(true, res);
                  button_1.destroy();
                } else callback && callback(false, "\u83b7\u53d6\u7528\u6237\u6388\u6743\u4fe1\u606f");
                console.log(res);
              });
            }
          },
          fail: function(res) {
            Logger_1.Logger.logInterface("getSetting\u8bf7\u6c42\u5931\u8d25 \uff1a " + JSON.stringify(res));
            callback && callback(false, "\u83b7\u53d6\u7528\u6237\u8bbe\u7f6e\u5931\u8d25");
          }
        });
      };
      WeChatPlatform.prototype.setClipboardData = function(sourcedata) {
        wx.setClipboardData({
          data: sourcedata,
          success: function(res) {
            wx.getClipboardData({
              success: function(res) {}
            });
          }
        });
      };
      WeChatPlatform.prototype.saveUserInfo = function(userName, url, callback) {
        var data = {
          data: {
            nickname: userName,
            headUrl: url
          }
        };
        var self = this;
      };
      WeChatPlatform.prototype.getSystemInfo = function() {
        return this._systemInfo;
      };
      WeChatPlatform.prototype.restartGame = function() {
        wx.restartMiniProgram();
      };
      WeChatPlatform.prototype.isRecordingTooShort = function() {
        return !!(this._isRecording && this._recordTime < this._MinRecordTime);
      };
      WeChatPlatform.prototype.getRecordStatu = function() {
        return this._isRecordFinished ? PlatformManager_1.RecordStatu.Finished : this._isRecording ? PlatformManager_1.RecordStatu.Recording : PlatformManager_1.RecordStatu.Inactive;
      };
      WeChatPlatform.prototype.startGameRecord = function() {
        var _this = this;
        if (this.getRecordStatu() != PlatformManager_1.RecordStatu.Inactive) return;
        this._isRecording = true;
        this._recorder = wx.getGameRecorder();
        wx.showLoading({
          title: "\u6b63\u5728\u542f\u52a8\u5f55\u5c4f"
        });
        this._recorder.start().then(function(res) {
          wx.hideLoading();
          res.error.code ? wx.showModal(res.errMsg, "\u53d1\u751f\u9519\u8bef") : _this._recorder.on("timeUpdate", function(res) {
            _this._recordTime = Math.min(res.currentTime, _this._MaxRecordTime);
          });
        });
      };
      WeChatPlatform.prototype.stopGameRecord = function() {
        var _this = this;
        if (this.getRecordStatu() != PlatformManager_1.RecordStatu.Recording) return;
        wx.showLoading({
          title: "\u6b63\u5728\u7ed3\u675f\u5f55\u5c4f"
        });
        this._recorder.stop().then(function(res) {
          wx.hideLoading();
          _this._isRecordFinished = true;
          _this._isRecording = false;
        });
      };
      WeChatPlatform.prototype.shareGameRecord = function() {
        if (this.getRecordStatu() == PlatformManager_1.RecordStatu.Inactive) return;
        this.getRecordStatu() == PlatformManager_1.RecordStatu.Recording && this.stopGameRecord();
        wx.operateGameRecorderVideo({
          title: this._title,
          desc: this._desc,
          timeRange: [ [ 0, this._recordTime ] ]
        });
        this._isRecordFinished = false;
        this._recordTime = 0;
      };
      WeChatPlatform.prototype.createRewardedAd = function() {
        var _this = this;
        if (wx.createRewardedVideoAd) {
          this._rewardedAd = wx.createRewardedVideoAd({
            adUnitId: this._rewardedADId
          });
          try {
            cb && this._rewardedAd.offClose(cb);
          } catch (err) {}
          var cb = function(res) {
            res && res.isEnded ? _this._rewardedCallBack(true) : _this._rewardedCallBack(false);
          };
          this._rewardedAd.onClose(cb);
          this._rewardedAd.onError(function(err) {
            _this._rewardedCallBack(false);
          });
        }
      };
      WeChatPlatform.prototype.createInterstitialAd = function() {
        if (wx.createInterstitialAd) {
          this._interstitialAd = wx.createInterstitialAd({
            adUnitId: this._interstitialADId
          });
          try {
            cb && this._interstitialAd.offClose(cb);
          } catch (err) {}
          var cb = function(res) {};
          this._interstitialAd.onClose(cb);
        }
      };
      WeChatPlatform.prototype.showRewardedAd = function(callback) {
        var _this = this;
        if (null != this._rewardedAd) {
          this._rewardedCallBack = callback;
          this._rewardedAd.load().then(function() {
            _this._rewardedAd.show().then(function() {}).catch(function(err) {
              _this.onShare(_this._rewardedCallBack);
            });
          }).catch(function(err) {
            _this.onShare(_this._rewardedCallBack);
          });
        } else this.onShare(this._rewardedCallBack);
      };
      WeChatPlatform.prototype.showInterstitialAd = function() {
        var _this = this;
        null != this._interstitialAd && Math.random() <= this._interstitialAdChances && this._interstitialAd.load().then(function() {
          _this._interstitialAd.show().then(function() {}).catch(function(err) {});
        });
      };
      WeChatPlatform.prototype.showBannerAd = function(bannerType, top, left, width) {
        var _this = this;
        if (wx.createBannerAd) {
          switch (bannerType) {
           case PlatformManager_1.BannerType.None:
            this._bannerWidth = width;
            break;

           default:
            this._bannerWidth = this._systemInfo.windowWidth;
          }
          this._bannerAd = wx.createBannerAd({
            adUnitId: this._bannerADId,
            adIntervals: 30,
            style: {
              left: 0,
              top: 0,
              width: this._bannerWidth
            }
          });
          this._bannerAd.onResize(function(res) {
            switch (bannerType) {
             case PlatformManager_1.BannerType.None:
              _this._bannerTop = top;
              _this._bannerLeft = (_this._systemInfo.windowWidth - _this._bannerAd.style.realWidth) / 2;
              break;

             case PlatformManager_1.BannerType.Top:
              _this._bannerTop = 0;
              _this._bannerLeft = (_this._systemInfo.windowWidth - _this._bannerAd.style.realWidth) / 2;
              break;

             case PlatformManager_1.BannerType.Center:
              _this._bannerTop = (_this._systemInfo.windowHeight - _this._bannerAd.style.realHeight) / 2;
              _this._bannerLeft = (_this._systemInfo.windowWidth - _this._bannerAd.style.realWidth) / 2;
              break;

             case PlatformManager_1.BannerType.Bottom:
              _this._bannerTop = _this._systemInfo.windowHeight - _this._bannerAd.style.realHeight;
              _this._bannerLeft = (_this._systemInfo.windowWidth - _this._bannerAd.style.realWidth) / 2;
            }
            _this._bannerAd.style.left = _this._bannerLeft;
            _this._bannerAd.style.top = _this._bannerTop;
          });
          this._bannerAd.onLoad(function() {});
          this._bannerAd.onError(function(err) {});
          null != this._bannerAd && this._bannerAd.show().then(function() {}).catch(function(err) {});
        }
      };
      WeChatPlatform.prototype.hideBannerAd = function() {
        var _this = this;
        null != this._bannerAd && this._bannerAd.hide().then(function() {
          _this._bannerAd.destroy();
        });
      };
      WeChatPlatform.prototype.onShare = function(callback) {
        this.shareCallBack = callback;
        this.hideDate = new Date();
        wx.shareAppMessage({
          title: this._title,
          imageUrl: this._imageUrl
        });
      };
      WeChatPlatform.prototype.vibrateShort = function(vibrateType) {
        wx.vibrateShort({
          type: vibrateType,
          success: function() {},
          fail: function(res) {}
        });
      };
      WeChatPlatform.prototype.vibrateLong = function() {
        wx.vibrateLong({
          success: function() {},
          fail: function(res) {}
        });
      };
      return WeChatPlatform;
    }();
    exports.WeChatPlatform = WeChatPlatform;
    cc._RF.pop();
  }, {
    "../common/loader/ResLoader": "ResLoader",
    "../common/log/Logger": "Logger",
    "./PlatformManager": "PlatformManager"
  } ],
  bundlePath: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "6701bAMD+lKWLCQP0kcZ5oZ", "bundlePath");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.BundlePath = void 0;
    var BundlePath = function() {
      function BundlePath() {}
      return BundlePath;
    }();
    exports.BundlePath = BundlePath;
    cc._RF.pop();
  }, {} ],
  cuttherope: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "10eacnz9kxFUJ5HGcSr9sHA", "cuttherope");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var rope_1 = require("./rope");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var cuttherope = function(_super) {
      __extends(cuttherope, _super);
      function cuttherope() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.startPoint = null;
        return _this;
      }
      cuttherope.prototype.onEnable = function() {
        this.initGraphics();
      };
      cuttherope.prototype.initGraphics = function() {
        var node = new cc.Node();
        this.node.parent.addChild(node);
        this.graphics = node.addComponent(cc.Graphics);
        this.graphics.strokeColor = cc.Color.RED;
        this.graphics.lineWidth = 5;
        var size = cc.view.getVisibleSize();
        this.graphics.node.position = cc.v3(-size.width / 2, -size.height / 2, 0);
      };
      cuttherope.prototype.onLoad = function() {
        cc.director.getPhysicsManager().enabled = true;
        this.node.setPosition(cc.v2(this.node.position.x - this.node.parent.position.x, this.node.position.y - this.node.parent.position.y));
        this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
      };
      cuttherope.prototype.onTouchStart = function(event) {
        this.startPoint = event.getLocation();
      };
      cuttherope.prototype.onTouchMove = function(event) {
        var endPoint = event.getLocation();
        this.graphics.clear();
        this.graphics.moveTo(this.startPoint.x, this.startPoint.y);
        this.graphics.lineTo(endPoint.x, endPoint.y);
        this.graphics.stroke();
      };
      cuttherope.prototype.onTouchEnd = function(event) {
        this.graphics.clear();
        var results = cc.director.getPhysicsManager().rayCast(cc.Camera.main.getCameraToWorldPoint(this.startPoint), cc.Camera.main.getCameraToWorldPoint(event.getLocation()), cc.RayCastType.All);
        if (results.length > 0) for (var i = results.length - 1; i >= 0; i--) {
          var cutRope = results[i].collider.node;
          var _ropes = [];
          while (0 == (_ropes = cutRope.getComponents(rope_1.default)).length) cutRope = cutRope.getComponent(cc.RevoluteJoint).connectedBody.node;
          for (var j = 0; j < _ropes.length; j++) {
            var element = _ropes[j];
            element.cut(results[i].collider.node);
          }
        }
      };
      cuttherope = __decorate([ ccclass ], cuttherope);
      return cuttherope;
    }(cc.Component);
    exports.default = cuttherope;
    cc._RF.pop();
  }, {
    "./rope": "rope"
  } ],
  floor: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7b565YPndRIw6TzmvkMLd5X", "floor");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var rope_1 = require("./rope");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var floor = function(_super) {
      __extends(floor, _super);
      function floor() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.success = null;
        _this.fail = null;
        _this.playerCount = 0;
        _this.enermyDown = false;
        _this.playerFloorCount = 0;
        _this.contactList = [];
        _this.floorList = [];
        return _this;
      }
      floor_1 = floor;
      floor.prototype.start = function() {
        floor_1.instance = this;
        for (var index = 0; index < this.node.parent.children.length; index++) {
          var element = this.node.parent.children[index];
          "Player" == element.name && this.playerCount++;
        }
      };
      floor.prototype.onBeginContact = function(contact, selfCollider, otherCollider) {
        if (-1 != this.contactList.indexOf(otherCollider.node)) return;
        this.contactList.push(otherCollider.node);
        if ("Player" == otherCollider.node.name) {
          this.checkOtherRopeCut(otherCollider.node);
          this.playerFloorCount >= this.playerCount && !this.enermyDown && (this.success.active = true);
        } else "Enermy" == otherCollider.node.name && this.checkOtherRopeCut(otherCollider.node);
      };
      floor.prototype.hasEnermyFloor = function(node) {
        var _this = this;
        for (var i = 0; i < this.floorList.length; i++) {
          var element = this.floorList[i];
          element && "Enermy" == element.name && cc.tween(element).to(1, {
            position: node.position
          }).call(function() {
            _this.fail.active = true;
          }).start();
        }
      };
      floor.prototype.hasPlayerFloor = function(node) {
        var _this = this;
        for (var i = 0; i < this.floorList.length; i++) {
          var element = this.floorList[i];
          element && "Player" == element.name && cc.tween(node).to(1, {
            position: element.position
          }).call(function() {
            _this.fail.active = true;
          }).start();
        }
      };
      floor.prototype.checkFloorCanCut = function() {
        for (var i = 0; i < this.contactList.length; i++) {
          var element = this.contactList[i];
          element && -1 == this.floorList.indexOf(element) && this.checkOtherRopeCut(element);
        }
      };
      floor.prototype.checkOtherRopeCut = function(node) {
        var records = {};
        var canCut = this.checkRopeCanCut(node, records);
        if (canCut) {
          this.cutRope(node);
          this.floorList.push(node);
          if ("Enermy" == node.name) {
            this.enermyDown = true;
            this.hasPlayerFloor(node);
          } else if ("Player" == node.name) {
            this.playerFloorCount++;
            this.hasEnermyFloor(node);
          }
        }
      };
      floor.prototype.cutRope = function(node) {
        var ropes = node.getComponents(rope_1.default);
        for (var i = 0; i < ropes.length; i++) {
          var element = ropes[i];
          element.onCut();
        }
        var revoluteJoints = node.getComponents(cc.RevoluteJoint);
        for (var i = 0; i < revoluteJoints.length; i++) {
          var element = revoluteJoints[i];
          var child = this.getChild(element);
        }
      };
      floor.prototype.checkRopeCanCut = function(node, records) {
        if (records[node.uuid]) return true;
        if ("Static" == node.name) return false;
        records[node.uuid] = true;
        var canCut = true;
        var revoluteJoints = node.getComponents(cc.RevoluteJoint);
        for (var i = 0; i < revoluteJoints.length; i++) {
          var element = revoluteJoints[i];
          if (element.connectedBody) {
            canCut = canCut && this.checkRopeCanCut(element.connectedBody.node, records);
            if (!canCut) return false;
          }
        }
        var ropes = node.getComponents(rope_1.default);
        for (var i = 0; i < ropes.length; i++) {
          var element = ropes[i];
          if (element.otherAnchor && !element.deleting) {
            canCut = canCut && this.checkRopeCanCut(element.otherAnchor, records);
            if (!canCut) return false;
          }
        }
        return canCut;
      };
      floor.prototype.getChild = function(ropeJoint) {
        if (ropeJoint && ropeJoint.connectedBody) return "rope" != ropeJoint.connectedBody.node.name ? ropeJoint.connectedBody.node : this.getChild(ropeJoint.connectedBody.getComponent(cc.RevoluteJoint));
        return null;
      };
      floor.prototype.getParent = function(node) {
        var _rope = node.getComponent(rope_1.default);
        if (_rope) return _rope.otherAnchor;
        return null;
      };
      var floor_1;
      floor.instance = null;
      __decorate([ property(cc.Node) ], floor.prototype, "success", void 0);
      __decorate([ property(cc.Node) ], floor.prototype, "fail", void 0);
      floor = floor_1 = __decorate([ ccclass ], floor);
      return floor;
    }(cc.Component);
    exports.default = floor;
    cc._RF.pop();
  }, {
    "./rope": "rope"
  } ],
  helper: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b88f4Ul10JLZr2XCZoB2JQv", "helper");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.lineCutPolygon = exports.splitPolygon = exports.computeUv = exports.isInPolygon = exports.isInTriangle = void 0;
    cc.Vec2;
    function ab_cross_ac(a, b, c) {
      return cross(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y);
    }
    function dot(x1, y1, x2, y2) {
      return x1 * x2 + y1 * y2;
    }
    function cross(x1, y1, x2, y2) {
      return x1 * y2 - x2 * y1;
    }
    function dblcmp(a, b) {
      if (Math.abs(a - b) <= 1e-6) return 0;
      return a > b ? 1 : -1;
    }
    function point_on_line(a, p1, p2) {
      return dblcmp(dot(p1.x - a.x, p1.y - a.y, p2.x - a.x, p2.y - a.y), 0);
    }
    function isInTriangle(point, triA, triB, triC) {
      var AB = new cc.Vec2();
      cc.Vec2.subtract(AB, triB, triA);
      var AC = new cc.Vec2();
      cc.Vec2.subtract(AC, triC, triA);
      var BC = new cc.Vec2();
      cc.Vec2.subtract(BC, triC, triB);
      var AD = new cc.Vec2();
      cc.Vec2.subtract(AD, point, triA);
      var BD = new cc.Vec2();
      cc.Vec2.subtract(BD, point, triB);
      return AB.cross(AC) >= 0 ^ AB.cross(AD) < 0 && AB.cross(AC) >= 0 ^ AC.cross(AD) >= 0 && BC.cross(AB) > 0 ^ BC.cross(BD) >= 0;
    }
    exports.isInTriangle = isInTriangle;
    function isInPolygon(checkPoint, polygonPoints) {
      var counter = 0;
      var i;
      var xinters;
      var p1, p2;
      var pointCount = polygonPoints.length;
      p1 = polygonPoints[0];
      for (i = 1; i <= pointCount; i++) {
        p2 = polygonPoints[i % pointCount];
        if (checkPoint.x > Math.min(p1.x, p2.x) && checkPoint.x <= Math.max(p1.x, p2.x) && checkPoint.y <= Math.max(p1.y, p2.y) && p1.x != p2.x) {
          xinters = (checkPoint.x - p1.x) * (p2.y - p1.y) / (p2.x - p1.x) + p1.y;
          (p1.y == p2.y || checkPoint.y <= xinters) && counter++;
        }
        p1 = p2;
      }
      if (counter % 2 == 0) return false;
      return true;
    }
    exports.isInPolygon = isInPolygon;
    function computeUv(points, width, height) {
      var uvs = [];
      for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
        var p = points_1[_i];
        var x = cc.clamp(0, 1, (p.x + width / 2) / width);
        var y = cc.clamp(0, 1, 1 - (p.y + height / 2) / height);
        uvs.push(cc.v2(x, y));
      }
      return uvs;
    }
    exports.computeUv = computeUv;
    function splitPolygon(points) {
      if (points.length <= 3) return [ 0, 1, 2 ];
      var pointMap = {};
      for (var i = 0; i < points.length; i++) {
        var p = points[i];
        pointMap[p.x + "-" + p.y] = i;
      }
      var getIdx = function(p) {
        return pointMap[p.x + "-" + p.y];
      };
      points = points.concat([]);
      var idxs = [];
      var index = 0;
      while (points.length > 3) {
        var p1 = points[index % points.length], p2 = points[(index + 1) % points.length], p3 = points[(index + 2) % points.length];
        var splitPoint = (index + 1) % points.length;
        var v1 = new cc.Vec2();
        cc.Vec2.subtract(v1, p2, p1);
        var v2 = new cc.Vec2();
        cc.Vec2.subtract(v2, p3, p2);
        if (v1.cross(v2) < 0) {
          index = (index + 1) % points.length;
          continue;
        }
        var hasPoint = false;
        for (var _i = 0, points_2 = points; _i < points_2.length; _i++) {
          var p = points_2[_i];
          if (p != p1 && p != p2 && p != p3 && isInTriangle(p, p1, p2, p3)) {
            hasPoint = true;
            break;
          }
        }
        if (hasPoint) {
          index = (index + 1) % points.length;
          continue;
        }
        idxs.push(getIdx(p1), getIdx(p2), getIdx(p3));
        points.splice(splitPoint, 1);
      }
      for (var _a = 0, points_3 = points; _a < points_3.length; _a++) {
        var p = points_3[_a];
        idxs.push(getIdx(p));
      }
      return idxs;
    }
    exports.splitPolygon = splitPolygon;
    function rayPointToLine(point, linePA, linePB) {
      var minX = Math.min(linePA.x, linePB.x);
      var maxX = Math.max(linePA.x, linePB.x);
      var minY = Math.min(linePA.y, linePB.y);
      var maxY = Math.max(linePA.y, linePB.y);
      if (point.y < minY || point.y > maxY || point.x > maxX) return -1;
      var x0 = linePA.x + (linePB.x - linePA.x) / (linePB.y - linePA.y) * (point.y - linePA.y);
      if (x0 > point.x) return 0;
      if (x0 == point.x) return 1;
      return -1;
    }
    function relationPointToPolygon(point, polygon) {
      var count = 0;
      for (var i = 0; i < polygon.length; ++i) {
        if (polygon[i].equals(point)) return 2;
        var pa = polygon[i];
        var pb = polygon[0];
        i < polygon.length - 1 && (pb = polygon[i + 1]);
        var re = rayPointToLine(point, pa, pb);
        if (1 == re) return 1;
        0 == re && count++;
      }
      if (count % 2 == 0) return -1;
      return 0;
    }
    function lineCrossPoint(p1, p2, q1, q2) {
      var a = p1, b = p2, c = q1, d = q2;
      var s1, s2, s3, s4;
      var d1, d2, d3, d4;
      var p = new cc.Vec2(0, 0);
      d1 = dblcmp(s1 = ab_cross_ac(a, b, c), 0);
      d2 = dblcmp(s2 = ab_cross_ac(a, b, d), 0);
      d3 = dblcmp(s3 = ab_cross_ac(c, d, a), 0);
      d4 = dblcmp(s4 = ab_cross_ac(c, d, b), 0);
      if (-2 == (d1 ^ d2) && -2 == (d3 ^ d4)) {
        p.x = (c.x * s2 - d.x * s1) / (s2 - s1);
        p.y = (c.y * s2 - d.y * s1) / (s2 - s1);
        return [ 0, p ];
      }
      if (0 == d1 && point_on_line(c, a, b) <= 0) {
        p = c;
        return [ 1, p ];
      }
      if (0 == d2 && point_on_line(d, a, b) <= 0) {
        p = d;
        return [ 1, p ];
      }
      if (0 == d3 && point_on_line(a, c, d) <= 0) {
        p = a;
        return [ 1, p ];
      }
      if (0 == d4 && point_on_line(b, c, d) <= 0) {
        p = b;
        return [ 1, p ];
      }
      return [ -1, null ];
    }
    function lineCutPolygon(pa, pb, polygon) {
      var ret = [];
      var points = [];
      var pointIndex = [];
      for (var i = 0; i < polygon.length; ++i) {
        points.push(polygon[i]);
        var a = polygon[i];
        var b = polygon[0];
        i < polygon.length - 1 && (b = polygon[i + 1]);
        var c = lineCrossPoint(pa, pb, a, b);
        if (0 == c[0]) {
          pointIndex.push(points.length);
          points.push(c[1]);
        } else c[0] > 0 && (c[1].equals(a) ? pointIndex.push(points.length - 1) : pointIndex.push(points.length));
      }
      if (pointIndex.length > 1) {
        var cp0 = points[pointIndex[0]];
        var cp1 = points[pointIndex[1]];
        var r = relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
        var inPolygon = r >= 0;
        var cp0_cp1 = new cc.Vec2();
        var len_0_1 = cc.Vec2.subtract(cp0_cp1, cp0, cp1).len();
        var cp0_cp = new cc.Vec2();
        var len_0_ = cc.Vec2.subtract(cp0_cp, cp0, points[pointIndex[pointIndex.length - 1]]).len();
        if (pointIndex.length > 2 && len_0_1 > len_0_) {
          cp1 = points[pointIndex[pointIndex.length - 1]];
          r = relationPointToPolygon(new cc.Vec2((cp0.x + cp1.x) / 2, (cp0.y + cp1.y) / 2), polygon);
          inPolygon = r < 0;
        }
        var firstInPolygon = inPolygon;
        var index = 0;
        var startIndex = pointIndex[index];
        var oldPoints = [];
        var newPoints = [];
        var count = 0;
        oldPoints.push(points[startIndex]);
        inPolygon && newPoints.push(points[startIndex]);
        index++;
        count++;
        startIndex++;
        while (count < points.length) {
          startIndex == points.length && (startIndex = 0);
          var p = points[startIndex];
          if (index >= 0 && startIndex == pointIndex[index]) {
            index++;
            index >= pointIndex.length && (index = 0);
            if (inPolygon) {
              newPoints.push(p);
              ret.push(newPoints);
              newPoints = [];
            } else {
              newPoints = [];
              newPoints.push(p);
            }
            oldPoints.push(p);
            inPolygon = !inPolygon;
          } else inPolygon ? newPoints.push(p) : oldPoints.push(p);
          startIndex++;
          count++;
        }
        if (inPolygon) if (!firstInPolygon && newPoints.length > 1) {
          newPoints.push(points[pointIndex[0]]);
          ret.push(newPoints);
        } else for (var i = 0; i < newPoints.length; ++i) oldPoints.push(newPoints[i]);
        ret.push(oldPoints);
      }
      return ret;
    }
    exports.lineCutPolygon = lineCutPolygon;
    cc._RF.pop();
  }, {} ],
  pro_screwlevel: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "19f23R8GzRNjIT1lJJ0nAno", "pro_screwlevel");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Board_1 = require("./Board");
    var Hole_1 = require("./Hole");
    var Screw_1 = require("./Screw");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var pro_screwlevel = function(_super) {
      __extends(pro_screwlevel, _super);
      function pro_screwlevel() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.success = null;
        _this.holePfb = null;
        _this.screwPfb = null;
        _this.CurScrew = null;
        _this.Holes = [];
        _this.Boards = [];
        _this.threshold = 8;
        _this.levels = [];
        _this.curLevel = 0;
        return _this;
      }
      pro_screwlevel_1 = pro_screwlevel;
      pro_screwlevel.prototype.onLoad = function() {
        pro_screwlevel_1.instance = this;
        cc.director.getPhysicsManager().enabled = true;
      };
      pro_screwlevel.prototype.start = function() {
        this.nextLevel();
      };
      pro_screwlevel.prototype.nextLevel = function() {
        var _this = this;
        this.curLevel >= 0 && this.curLevel < this.levels.length && (this.levels[this.curLevel].active = false);
        this.curLevel++;
        this.Holes = [];
        this.Boards = [];
        this.CurScrew = null;
        if (this.curLevel >= 0 && this.curLevel < this.levels.length) {
          var levelNode = this.levels[this.curLevel];
          levelNode.active = true;
          var initHoles_1 = [];
          var boards = levelNode.getComponentsInChildren(Board_1.default);
          for (var i = 0; i < boards.length; i++) {
            var board = boards[i];
            for (var j = 0; j < board.node.children.length; j++) {
              var children = board.node.children[j];
              if (children.children.length > 0) {
                var worldPos = children.parent.convertToWorldSpaceAR(cc.v2(children.position));
                var localPos = levelNode.convertToNodeSpaceAR(worldPos);
                var holeNode = cc.instantiate(this.holePfb);
                levelNode.addChild(holeNode);
                holeNode.setSiblingIndex(0);
                holeNode.setPosition(localPos);
                var screwNode = cc.instantiate(this.screwPfb);
                levelNode.addChild(screwNode);
                screwNode.setSiblingIndex(100);
                screwNode.setPosition(localPos);
                initHoles_1.push({
                  holeNode: holeNode,
                  screwNode: screwNode
                });
              }
            }
          }
          var holes = levelNode.getComponentsInChildren(Hole_1.default);
          for (var i = 0; i < holes.length; i++) {
            var hole = holes[i].node;
            if (hole.children.length > 0) {
              var worldPos = hole.parent.convertToWorldSpaceAR(cc.v2(hole.position));
              var localPos = levelNode.convertToNodeSpaceAR(worldPos);
              var screwNode = cc.instantiate(this.screwPfb);
              levelNode.addChild(screwNode);
              screwNode.setSiblingIndex(100);
              screwNode.setPosition(localPos);
              screwNode.getComponent(cc.PhysicsCircleCollider).enabled = true;
            }
          }
          var rigs = levelNode.getComponentsInChildren(cc.RigidBody);
          for (var index = 0; index < rigs.length; index++) {
            var element = rigs[index];
            element.node.setPosition(cc.v2(element.node.position.x - element.node.parent.parent.position.x, element.node.position.y - element.node.parent.parent.position.y));
          }
          this.scheduleOnce(function() {
            for (var index = 0; index < initHoles_1.length; index++) {
              var element = initHoles_1[index];
              var hole = element.holeNode.getComponent(Hole_1.default);
              var ret = _this.getTouchBoardJoint(hole);
              if (ret.success) {
                element.screwNode.getComponent(Screw_1.default).move(hole, ret.boardJoints);
                element.screwNode.getComponent(cc.PhysicsCircleCollider).enabled = true;
              }
            }
          });
        } else this.success.active = true;
      };
      pro_screwlevel.prototype.checkWin = function() {
        var _this = this;
        console.log("checkwin????");
        this.scheduleOnce(function() {
          0 == _this.Boards.length && _this.nextLevel();
        });
      };
      pro_screwlevel.prototype.regesitHole = function(hole) {
        this.Holes.push(hole);
      };
      pro_screwlevel.prototype.regesitBoard = function(board) {
        this.Boards.push(board);
      };
      pro_screwlevel.prototype.unRegesitBoard = function(board) {
        this.Boards.splice(this.Boards.indexOf(board), 1);
      };
      pro_screwlevel.prototype.getTouchHole = function(pos) {
        var ret = null;
        this.Holes.forEach(function(element) {
          if (cc.Vec2.distance(pos, cc.v2(element.node.position.x, element.node.position.y)) <= element.node.width / 2) {
            ret = element;
            return;
          }
        });
        return ret;
      };
      pro_screwlevel.prototype.getTouchBoardJoint = function(hole) {
        var boardJoints = [];
        var success = true;
        for (var i = 0; i < this.Boards.length; i++) {
          var element = this.Boards[i];
          var flag = true;
          for (var j = 0; j < element.node.children.length; j++) {
            var child = element.node.children[j];
            var dis = cc.Vec2.distance(hole.node.parent.convertToWorldSpaceAR(hole.node.position), child.parent.convertToWorldSpaceAR(child.position));
            if (dis < this.threshold) {
              flag = true;
              boardJoints.push(child);
              break;
            }
            var worldPos = hole.node.parent.convertToWorldSpaceAR(hole.node.position);
            var localPos = element.node.convertToNodeSpaceAR(worldPos);
            Math.abs(localPos.x) < (element.node.width + hole.node.width) / 2 && Math.abs(localPos.y) < (element.node.height + hole.node.height) / 2 && (flag = false);
          }
          if (!flag) {
            success = false;
            break;
          }
        }
        return {
          success: success,
          boardJoints: boardJoints
        };
      };
      pro_screwlevel.prototype.onClickHole = function(event) {
        var screw = this.CurScrew;
        if (screw) {
          var hole = this.getTouchHole(this.node.parent.convertToNodeSpaceAR(cc.Camera.main.getCameraToWorldPoint(event.getLocation())));
          if (hole) {
            var ret = this.getTouchBoardJoint(hole);
            ret.success ? screw.move(hole, ret.boardJoints) : screw.isUp = false;
          } else screw.isUp = false;
        }
      };
      var pro_screwlevel_1;
      pro_screwlevel.instance = null;
      __decorate([ property(cc.Node) ], pro_screwlevel.prototype, "success", void 0);
      __decorate([ property(cc.Prefab) ], pro_screwlevel.prototype, "holePfb", void 0);
      __decorate([ property(cc.Prefab) ], pro_screwlevel.prototype, "screwPfb", void 0);
      __decorate([ property([ cc.Node ]) ], pro_screwlevel.prototype, "levels", void 0);
      pro_screwlevel = pro_screwlevel_1 = __decorate([ ccclass ], pro_screwlevel);
      return pro_screwlevel;
    }(cc.Component);
    exports.default = pro_screwlevel;
    cc._RF.pop();
  }, {
    "./Board": "Board",
    "./Hole": "Hole",
    "./Screw": "Screw"
  } ],
  rope: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "40b374xUBREm4mGKFPzRLXK", "rope");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var floor_1 = require("./floor");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var rope = function(_super) {
      __extends(rope, _super);
      function rope() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.anchor = null;
        _this.otherAnchor = null;
        _this.ropeCutPrefab = null;
        _this.softDegree = 7;
        _this.ropeCutArray = [];
        _this.otherAnchorJoint = null;
        _this.deleting = false;
        return _this;
      }
      rope.prototype.onLoad = function() {
        this.anchor = this.node;
      };
      rope.prototype.start = function() {
        var ropeCutArray = this.ropeCutArray;
        for (var i = 0; i < this.softDegree; i++) {
          ropeCutArray[i] = cc.instantiate(this.ropeCutPrefab);
          this.node.parent.addChild(ropeCutArray[i]);
          ropeCutArray[i].setSiblingIndex(0);
          var ropeJoint_1 = ropeCutArray[i].addComponent(cc.RevoluteJoint);
          if (0 == i) {
            ropeJoint_1.connectedBody = this.anchor.getComponent(cc.RigidBody);
            ropeJoint_1.anchor = cc.v2(0, -ropeCutArray[i].height / 2);
            ropeJoint_1.connectedAnchor = cc.v2();
          } else {
            ropeCutArray[i].addComponent(cc.RopeJoint);
            ropeJoint_1.connectedBody = ropeCutArray[i - 1].getComponent(cc.RigidBody);
            ropeJoint_1.anchor = cc.v2(0, -ropeCutArray[i].height / 2 + 1);
            ropeJoint_1.connectedAnchor = cc.v2(0, ropeCutArray[i - 1].height / 2);
          }
          ropeJoint_1.apply();
        }
        var ropeJoint = this.otherAnchor.addComponent(cc.RevoluteJoint);
        this.otherAnchorJoint = ropeJoint;
        ropeJoint.connectedBody = ropeCutArray[ropeCutArray.length - 1].getComponent(cc.RigidBody);
        ropeJoint.anchor = cc.v2(0, 0);
        ropeJoint.connectedAnchor = cc.v2(0, ropeCutArray[ropeCutArray.length - 1].height / 2);
      };
      rope.prototype.cut = function(cutRope) {
        var index = this.ropeCutArray.indexOf(cutRope);
        if (-1 == index) return;
        this.ropeCutArray[index].destroy();
        this.ropeCutArray.splice(index, 0);
        this.onCut();
        floor_1.default.instance.checkFloorCanCut();
      };
      rope.prototype.onCut = function() {
        var _a, _b;
        var _loop_1 = function(i) {
          var element = this_1.ropeCutArray[i];
          null === (_a = element.getComponent(cc.PhysicsBoxCollider)) || void 0 === _a ? void 0 : _a.destroy();
          cc.tween(element).to(1, {
            opacity: 0
          }).call(function() {
            element.destroy();
          }).start();
        };
        var this_1 = this;
        for (var i = 0; i < this.ropeCutArray.length; i++) _loop_1(i);
        this.destroy();
        null === (_b = this.otherAnchorJoint) || void 0 === _b ? void 0 : _b.destroy();
        this.otherAnchorJoint = null;
        this.deleting = true;
      };
      __decorate([ property(cc.Node) ], rope.prototype, "otherAnchor", void 0);
      __decorate([ property(cc.Prefab) ], rope.prototype, "ropeCutPrefab", void 0);
      __decorate([ property(cc.Float) ], rope.prototype, "softDegree", void 0);
      rope = __decorate([ ccclass ], rope);
      return rope;
    }(cc.Component);
    exports.default = rope;
    cc._RF.pop();
  }, {
    "./floor": "floor"
  } ],
  sceneManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "fc5d5bDcvRGipmUFRl15iXH", "sceneManager");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.SceneManager = void 0;
    var SceneConfig_1 = require("./SceneConfig");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var SceneManager = function() {
      function SceneManager() {
        this.configs = {};
        this.isNext = false;
      }
      SceneManager_1 = SceneManager;
      Object.defineProperty(SceneManager, "instance", {
        get: function() {
          if (null == this._instance) {
            this._instance = new SceneManager_1();
            this._instance.init(SceneConfig_1.SceneConfigDate);
          }
          return this._instance;
        },
        enumerable: false,
        configurable: true
      });
      SceneManager.prototype.init = function(configs) {
        this.configs = configs;
      };
      SceneManager.prototype.open = function(uiId, uiArgs, callback) {
        var config = this.configs[uiId];
        if (null == config) {
          cc.warn("\u6253\u5f00\u7f16\u53f7\u4e3a\u3010" + uiId + "\u3011\u7684\u754c\u9762\u5931\u8d25\uff0c\u914d\u7f6e\u4fe1\u606f\u4e0d\u5b58\u5728");
          return;
        }
        switch (config.layer) {
         case SceneConfig_1.sceneType.Get:
          this.get(config);
          break;

         case SceneConfig_1.sceneType.Open:
          this.openScene(config);
          this.previousScene;
          (this.isNext = true) && (this.previousScene = this.nextScene);
          this.nextScene = config;
          break;

         case SceneConfig_1.sceneType.Previous:
          null == config.Scenefile && (this.previousScene = config);
          console.log("\u4e0a\u4e00\u573a\u666f\u4fe1\u606f" + this.previousScene.Scenefile);
        }
      };
      SceneManager.prototype.preloadScene = function(url, callback) {
        cc.director.preloadScene(url.Scenefile, null, callback());
      };
      SceneManager.prototype.openScene = function(url, callback) {
        var _this = this;
        url.bundle ? this.loadScene(url.bundle, url.Scenefile, function(err, data) {
          err && cc.error(err);
          cc.director.runSceneImmediate(data);
          _this.isNext = true;
        }) : this.loadScene(url.Scenefile, function(err, data) {
          err && cc.error(err);
          cc.director.runSceneImmediate(data);
          _this.isNext = true;
        });
      };
      SceneManager.prototype.get = function(config) {
        this.sceneIofo = config;
        console.log("\u573a\u666f\u4fe1\u606f" + this.sceneIofo.Scenefile);
      };
      SceneManager.prototype.parseLoadResArgs = function(sceneName, options, onProgress, onComplete) {
        var sceneNameOut = sceneName;
        var optionsOut = options;
        var onProgressOut = onProgress;
        var onCompleteOut = onComplete;
        if (void 0 === onComplete) {
          var isValidOptions = cc.js.isChildClassOf(options, cc.SceneAsset);
          if (onProgress) {
            onCompleteOut = onProgress;
            isValidOptions && (onProgressOut = null);
          } else if (void 0 === onProgress && !isValidOptions) {
            onCompleteOut = options;
            onProgressOut = null;
            optionsOut = null;
          }
          if (void 0 !== onProgress && !isValidOptions) {
            onProgressOut = options;
            optionsOut = null;
          }
        }
        return {
          sceneName: sceneNameOut,
          options: optionsOut,
          onProgress: onProgressOut,
          onComplete: onCompleteOut
        };
      };
      SceneManager.prototype.loadByBundleAndArgs = function(bundle, args) {
        "string" == typeof args.sceneName, bundle.loadScene(args.sceneName, args.options, args.onProgress, args.onComplete);
      };
      SceneManager.prototype.loadByArgs = function(args) {
        var _this = this;
        if (args.bundle) if (cc.assetManager.bundles.has(args.bundle)) {
          var bundle = cc.assetManager.bundles.get(args.bundle);
          this.loadByBundleAndArgs(bundle, args);
        } else cc.assetManager.loadBundle(args.bundle, function(err, bundle) {
          err || _this.loadByBundleAndArgs(bundle, args);
        }); else this.loadByBundleAndArgs(cc.resources, args);
      };
      SceneManager.prototype.loadScene = function(bundleName, sceneName, options, onProgress, onComplete) {
        var args = null;
        if ("string" === typeof sceneName) {
          args = this.parseLoadResArgs(sceneName, options, onProgress, onComplete);
          args.bundle = bundleName;
        } else args = this.parseLoadResArgs(bundleName, sceneName, options, onProgress);
        this.loadByArgs(args);
      };
      var SceneManager_1;
      SceneManager = SceneManager_1 = __decorate([ ccclass ], SceneManager);
      return SceneManager;
    }();
    exports.SceneManager = SceneManager;
    cc._RF.pop();
  }, {
    "./SceneConfig": "SceneConfig"
  } ],
  soundManager: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "47c20ip/LBLMJ/A79SZKjlE", "soundManager");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.soundManager = void 0;
    var soundManager = function() {
      function soundManager() {}
      soundManager.playSound = function(name, scale, bol) {
        void 0 === name && (name = null);
        void 0 === scale && (scale = 1);
        void 0 === bol && (bol = false);
        var data = localStorage.getItem("set");
        var storage = data ? JSON.parse(data) : data;
        if (storage && false == storage.SoundEffect) return;
        cc.resources.load("sound/" + name, cc.AudioClip, function(err, asset) {
          err && console.log(err);
          var id = cc.audioEngine.playEffect(asset, bol);
          cc.audioEngine.setVolume(id, scale);
        });
      };
      soundManager.playMusic = function(name) {
        var _this = this;
        void 0 === name && (name = "yx");
        var data = localStorage.getItem("set");
        var storage = data ? JSON.parse(data) : data;
        if (storage && false == storage.Music) {
          this.stopMusic();
          return;
        }
        cc.resources.load("sound/" + name, cc.AudioClip, function(err, asset) {
          err && console.log(err);
          _this.musicId = cc.audioEngine.playMusic(asset, true);
          cc.audioEngine.setVolume(_this.musicId, 1);
        });
      };
      soundManager.pauseMusic = function() {
        var music = cc.find("Canvas/music").getComponent(cc.AudioSource);
        music.pause();
      };
      soundManager.stopMusic = function() {
        cc.audioEngine.stop(this.musicId);
      };
      return soundManager;
    }();
    exports.soundManager = soundManager;
    cc._RF.pop();
  }, {} ],
  storage: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b19797GWQhOz4gMfAWngCoJ", "storage");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.storage = exports.LocalStorage = void 0;
    var LocalStorage = function() {
      function LocalStorage() {
        this.setbool = true;
        this.user_ID = "";
      }
      LocalStorage.prototype.setUser = function(id) {
        this.user_ID = id;
      };
      LocalStorage.prototype.setItem = function(key, value) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        if (this.setbool) {
          key = this.user_ID + "_" + key;
          var data = JSON.stringify(value);
          localStorage.setItem(key, data);
        }
      };
      LocalStorage.prototype.getItem = function(key) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        key = this.user_ID + "_" + key;
        var data = localStorage.getItem(key);
        return data ? JSON.parse(data) : data;
      };
      LocalStorage.prototype.getSpecialItem = function(key) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        key = "" + key;
        var data = localStorage.getItem(key);
        return data ? JSON.parse(data) : data;
      };
      LocalStorage.prototype.setSpecialItem = function(key, value) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        key = "" + key;
        var data = JSON.stringify(value);
        localStorage.setItem(key, data);
      };
      LocalStorage.prototype.removeSpecialItemByKey = function(key) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        key = "" + key;
        localStorage.removeItem(key);
      };
      LocalStorage.prototype.removeItemByKey = function(key) {
        if ("string" !== typeof key) return console.error("\u4f20\u5165 key \u7c7b\u578b\u9519\u8bef");
        key = this.user_ID + "_" + key;
        console.log("\u5220\u9664\u6570\u636e", key);
        localStorage.removeItem(key);
      };
      LocalStorage.prototype.clear = function() {
        localStorage.clear();
        this.setbool = false;
      };
      return LocalStorage;
    }();
    exports.LocalStorage = LocalStorage;
    exports.storage = new LocalStorage();
    cc._RF.pop();
  }, {} ],
  tool: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "c4b02zpbMtOzo5/RNAl9qY/", "tool");
    "use strict";
    var __extends = this && this.__extends || function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function(d, b) {
          d.__proto__ = b;
        } || function(d, b) {
          for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var Engine_1 = require("../../core/Engine");
    var MathUtil_1 = require("../../core/utils/MathUtil");
    var TexturePlus_1 = require("./TexturePlus");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, executeInEditMode = _a.executeInEditMode;
    var ToolsSplit = function(_super) {
      __extends(ToolsSplit, _super);
      function ToolsSplit() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.textureRoot = null;
        _this.graphics = null;
        _this.pic = null;
        _this.ExplosionDistance = 700;
        _this.textures = [];
        _this.startPoint = null;
        _this.endPoint = null;
        return _this;
      }
      ToolsSplit.prototype.start = function() {
        this.init();
        this.setEvent();
        if (this.graphics) {
          this.graphics.node.x = -cc.visibleRect.width / 2;
          this.graphics.node.y = -cc.visibleRect.height / 2;
        }
      };
      ToolsSplit.prototype.setEvent = function() {
        this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
      };
      ToolsSplit.prototype.removeEvent = function() {
        this.node.off(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
        this.node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
        this.node.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
        this.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
      };
      ToolsSplit.prototype.init = function(callback) {
        var node = new cc.Node();
        var t = node.addComponent(TexturePlus_1.default);
        node.parent = this.textureRoot;
        t.texture = this.pic;
        this.textures.push(t);
        callback && callback();
      };
      ToolsSplit.prototype.onTouchStart = function(e) {
        this.startPoint = e.getLocation();
      };
      ToolsSplit.prototype.onTouchMove = function(e) {
        this.graphics.clear();
        this.graphics.moveTo(this.startPoint.x, this.startPoint.y);
        var p = e.getLocation();
        this.graphics.arc(p.x, p.y, 5);
        this.graphics.stroke();
      };
      ToolsSplit.prototype.onTouchEnd = function(e) {
        this.graphics.clear();
        this.endPoint = e.getLocation();
        this.useLineCutPolygon(this.startPoint, this.endPoint);
      };
      ToolsSplit.prototype.explode = function(callback, explodecallback) {
        var self = this;
        self.shakeEffect(function() {
          self.doSplit();
          explodecallback && explodecallback();
          self.onClickFly(callback);
        });
      };
      ToolsSplit.prototype.doSplit = function() {
        var h = this.pic.height, w = this.pic.width;
        for (var i = 0; i < 10; i++) {
          var p0 = cc.v2(-(w / 2 + 10), Math.random() * h - h / 2);
          var p1 = cc.v2(w / 2 + 10, Math.random() * h - h / 2);
          this.useLineCutPolygon(p0, p1, false);
        }
        for (var i = 0; i < 10; i++) {
          var p0 = cc.v2(Math.random() * w - w / 2, -(h / 2 + 10));
          var p1 = cc.v2(Math.random() * w - w / 2, h / 2 + 10);
          this.useLineCutPolygon(p0, p1, false);
        }
      };
      ToolsSplit.prototype.useLineCutPolygon = function(p0, p1, isWorld) {
        void 0 === isWorld && (isWorld = true);
        for (var i = this.textures.length - 1; i >= 0; i--) {
          var texture = this.textures[i];
          var pa = p0.clone();
          var pb = p1.clone();
          if (isWorld) {
            pa = texture.node.convertToNodeSpaceAR(p0);
            pb = texture.node.convertToNodeSpaceAR(p1);
          }
          var polygons = MathUtil_1.PolygonUtil.lineCutPolygon(pa, pb, texture.polygon);
          if (polygons.length <= 0) continue;
          this.splitTexture(texture, polygons);
        }
      };
      ToolsSplit.prototype.splitTexture = function(texture, polygons) {
        texture.polygon = polygons[0];
        for (var i = 1; i < polygons.length; i++) {
          var node = new cc.Node();
          var t = node.addComponent(TexturePlus_1.default);
          node.parent = this.textureRoot;
          node.setPosition(texture.node.position);
          t.texture = this.pic;
          t.polygon = polygons[i];
          this.textures.push(t);
        }
      };
      ToolsSplit.prototype.onClickFly = function(callback) {
        var _this = this;
        var _loop_1 = function(i) {
          var center = this_1.getPolygonCenter(this_1.textures[i].polygon);
          var dir = center.normalize();
          cc.tween(this_1.textures[i].node).by(1.5, {
            x: dir.x * this_1.ExplosionDistance,
            y: dir.y * this_1.ExplosionDistance
          }, cc.easeCircleActionOut()).call(function() {
            i >= _this.textures.length - 1 && callback && callback();
          }).start();
        };
        var this_1 = this;
        for (var i = 0; i < this.textures.length; i++) _loop_1(i);
      };
      ToolsSplit.prototype.onClickReset = function(callback, callback2, newText) {
        var _this = this;
        for (var i = 0; i < this.textures.length; i++) {
          var center = this.getPolygonCenter(this.textures[i].polygon);
          var dir = center.normalize();
          if (newText) {
            this.pic = newText;
            var a = this.textures[i].polygon;
            this.textures[i].texture = this.pic;
            this.textures[i].polygon = a;
          }
          cc.tween(this.textures[i].node).by(.7, {
            x: -dir.x * this.ExplosionDistance,
            y: -dir.y * this.ExplosionDistance
          }).call(function() {
            _this.onResetFallDown();
            cc.tween(_this.textures[0].node).to(.2, {
              scale: 1.2
            }).call(function() {
              cc.tween(_this.textures[0].node).to(.1, {
                scale: 1
              }).start();
            }).start();
            callback();
          }).start();
        }
      };
      ToolsSplit.prototype.onFallDown = function() {
        for (var i = 0; i < this.textures.length; i++) {
          var center = this.getPolygonCenter(this.textures[i].polygon);
          cc.tween(this.textures[i].node).delay((center.y + this.pic.height) / this.pic.height).by(2, {
            y: -500
          }, cc.easeCircleActionIn()).start();
        }
      };
      ToolsSplit.prototype.onResetFallDown = function(newText) {
        newText && (this.pic = newText);
        this.textureRoot.destroyAllChildren();
        this.textureRoot.removeAllChildren();
        this.textures = [];
        this.init();
      };
      ToolsSplit.prototype.zhendon = function(time, type) {
        void 0 === type && (type = "light");
        if (Engine_1.engine.isWechat()) {
          var long_1 = time / 400;
          var short_1 = time % 400 / 15;
          var callback_1 = function() {
            if (long_1 > 0) {
              long_1--;
              wx.vibrateLong({
                success: function() {
                  console.log("\u9707\u52a8\u8c03\u7528\u6210\u529f");
                },
                fail: function(res) {
                  console.log("\u9707\u52a8\u8c03\u7528\u5931\u8d25:");
                  console.log(res);
                },
                complete: callback_1
              });
            } else if (short_1 > 0) {
              short_1--;
              wx.vibrateShort({
                type: type,
                success: function() {
                  console.log("\u9707\u52a8\u8c03\u7528\u6210\u529f");
                },
                fail: function(res) {
                  console.log("\u9707\u52a8\u8c03\u7528\u5931\u8d25:");
                  console.log(res);
                },
                complete: callback_1
              });
            }
          };
          long_1 > 0 ? wx.vibrateLong({
            success: function() {
              console.log("\u9707\u52a8\u8c03\u7528\u6210\u529f");
            },
            fail: function(res) {
              console.log("\u9707\u52a8\u8c03\u7528\u5931\u8d25:");
              console.log(res);
            },
            complete: callback_1
          }) : wx.vibrateShort({
            type: type,
            success: function() {
              console.log("\u9707\u52a8\u8c03\u7528\u6210\u529f");
            },
            fail: function(res) {
              console.log("\u9707\u52a8\u8c03\u7528\u5931\u8d25:");
              console.log(res);
            },
            complete: callback_1
          });
        }
      };
      ToolsSplit.prototype.getPolygonCenter = function(polygon) {
        var x = 0, y = 0;
        for (var i = 0; i < polygon.length; i++) {
          x += polygon[i].x;
          y += polygon[i].y;
        }
        x /= polygon.length;
        y /= polygon.length;
        return cc.v2(x, y);
      };
      ToolsSplit.prototype.shakeEffect = function(callback) {
        var _this = this;
        this.node.runAction(cc.repeatForever(cc.sequence(cc.moveTo(.02, cc.v2(5, 7)), cc.moveTo(.02, cc.v2(-6, 7)), cc.moveTo(.02, cc.v2(-13, 3)), cc.moveTo(.02, cc.v2(3, -6)), cc.moveTo(.02, cc.v2(-5, 5)), cc.moveTo(.02, cc.v2(2, -8)), cc.moveTo(.02, cc.v2(-8, -10)), cc.moveTo(.02, cc.v2(3, 10)), cc.moveTo(.02, cc.v2(0, 0)))));
        setTimeout(function() {
          _this.node.stopAllActions();
          _this.node.setPosition(0, 0);
          callback && callback();
        }, 1e3);
      };
      __decorate([ property(cc.Node) ], ToolsSplit.prototype, "textureRoot", void 0);
      __decorate([ property(cc.Graphics) ], ToolsSplit.prototype, "graphics", void 0);
      __decorate([ property(cc.Texture2D) ], ToolsSplit.prototype, "pic", void 0);
      __decorate([ property(Number) ], ToolsSplit.prototype, "ExplosionDistance", void 0);
      ToolsSplit = __decorate([ ccclass("ToolsSplit") ], ToolsSplit);
      return ToolsSplit;
    }(cc.Component);
    exports.default = ToolsSplit;
    cc._RF.pop();
  }, {
    "../../core/Engine": "Engine",
    "../../core/utils/MathUtil": "MathUtil",
    "./TexturePlus": "TexturePlus"
  } ],
  twoThreeThreePlatform: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "8546cCEPUJEArZnLun/qTUj", "twoThreeThreePlatform");
    "use strict";
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var FMJava_1 = require("./FMJava");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var twoThreeThreePlatform = function() {
      function twoThreeThreePlatform() {}
      twoThreeThreePlatform.prototype.FullScreenVideoAd = function() {
        cc.sys.platform == cc.sys.ANDROID && jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "FullScreenVideoAd", "()V");
      };
      twoThreeThreePlatform.prototype.InterstitialAd = function() {
        cc.sys.platform == cc.sys.ANDROID && jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "InterstitialAd", "()V");
      };
      twoThreeThreePlatform.prototype.ShowBanner = function() {
        cc.sys.platform == cc.sys.ANDROID && jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "ShowBanner", "()V");
      };
      twoThreeThreePlatform.prototype.HideBanner = function() {
        cc.sys.platform == cc.sys.ANDROID && jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "HideBanner", "()V");
      };
      twoThreeThreePlatform.prototype.OnVideoBtn = function() {
        this.showRewardedVideoAd(function(isok) {
          isok ? console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891\u5b8c\u6210") : console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891\u5931\u8d25");
        }, function() {
          console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891\u5931\u8d25");
        });
      };
      twoThreeThreePlatform.prototype.showRewardedVideoAd = function(success, fail) {
        console.log("\u64ad\u653e\u6fc0\u52b1\u89c6\u9891");
        FMJava_1.default.showRewardedVideoAd(success, fail);
      };
      twoThreeThreePlatform = __decorate([ ccclass ], twoThreeThreePlatform);
      return twoThreeThreePlatform;
    }();
    exports.default = twoThreeThreePlatform;
    cc._RF.pop();
  }, {
    "./FMJava": "FMJava"
  } ]
}, {}, [ "Main", "Engine", "Initialize", "LoadingViewComp", "Login", "Root", "AudioEffect", "AudioManager", "AudioMusic", "GameComponent", "EngineMessage", "EventDispatcher", "MessageManager", "ResLoader", "bundlePath", "Logger", "RandomManager", "TimerManager", "AsyncQueue", "SceneConfig", "sceneManager", "storage", "GUI", "ButtonClickSimple", "ButtonEffect", "ButtonSimple", "LabelChange", "LabelNumber", "LabelShowTime", "LabelTime", "Defines", "DelegateComponent", "LayerAction", "LayerDialog", "LayerManager", "LayerMap", "LayerNotify", "LayerPopup", "LayerUI", "NotifyComponent", "UIMap", "CommonPrompt", "Loadingindicator", "TipsManager", "JsonOb", "StringFormat", "VMBase", "VMCompsEdit", "VMCustom", "VMEvent", "VMLabel", "VMModify", "VMParent", "VMProgress", "ViewModel", "RedPoint", "RedPtNode", "RedPtTree", "HttpRequest", "NetInterface", "NetManager", "NetNode", "NetState", "WebSock", "FMJava", "HuaWei", "IPlatform", "KsPlatform", "OPPOPlatform", "PlatformManager", "TikTokPlatform", "VIVOPlatform", "WechatPlatform", "twoThreeThreePlatform", "UserBehaviorManager", "ArrayUtil", "Bezier", "CameraUtil", "GeneratorUtil", "ImageUtil", "JsonUtil", "LayerUtil", "MathUtil", "ObjectUtil", "RegexUtil", "RotateUtil", "StringUtil", "TweenUtil", "Vec3Util", "ViewUtil", "CableShape", "EffectManager", "GKManager", "HxpgManager", "LoadingBar", "PoolManager", "QwghManager", "TLManager", "soundManager", "MusicPanel", "Ball", "CameraFollow", "Circle", "PaoGame", "PersonalPanel", "SingletonModuleComp", "CommonUtils", "Plolygon", "TextureAssembler", "TexturePlus", "TurnTable", "UISplitImage", "helper", "tool", "Account", "AccountModelComp", "BuildTimeConstants", "Config", "GameAudioConfig", "GameConfig", "GameEvent", "GameQueryConfig", "GameUIConfig", "RedPointConfig", "UIConfig", "UrlParse", "NetChannelManager", "NetConfig", "NetGameTips", "NetNodeGame", "cuttherope", "floor", "rope", "GraphicsSpriteMesh", "LongHandGame", "Board", "Hole", "Screw", "pro_screwlevel", "CocosHelper", "CommonUtilsNew", "MathUtils", "PolygonUtil", "SysDefine", "TextureAssemblerNew", "TexturePlusNew", "UISplitTexture" ]);